You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure which environment we should trust, so maybe relying on NODE_ENV is fine. Just took me by surprise today and I had to dig around in source code to figure it out. Setting NODE_ENV=test fixed the problem.
The text was updated successfully, but these errors were encountered:
For more info, I've created a branch in a demo app on Webpacker 6 that runs Rails system tests without any Webpacker-specific configuration. Webpacker precompiles as expected when I run system tests. I don't have enough info from your description to understand how to reproduce the issue you're have.
On an older app I use the code mentioned here: #360 to precompile my test assets (
Webpacker.compile
)Starting a new app today off 6.0.0.beta.2 and the same no longer works. I think it is because this line: https://github.com/rails/webpacker/blob/master/lib/tasks/webpacker/compile.rake#L23 uses the production environment if
NODE_ENV
is unset, while in older versions it usesWebpacker.env
(which is based onRAILS_ENV
instead, and is correctly set to "test" in my case).I'm not sure which environment we should trust, so maybe relying on
NODE_ENV
is fine. Just took me by surprise today and I had to dig around in source code to figure it out. SettingNODE_ENV=test
fixed the problem.The text was updated successfully, but these errors were encountered: