-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
running webpack when NODE_ENV=test #1429
Comments
@ciampam9 Apologies for late reply. Good question - basically I wanted to remove it in this PR #1359 but totally forgot in the end. If you check out that PR I have explained the reasons for only having development and production for
For your use case you could do, since now # NODE_ENV is development by default
RAILS_ENV=test ./bin/webpack or you could use
|
@gauravtiwari Not sure if this is the same issue but even when I set |
@aceofspades What version of webpacker are you using? |
@gauravtiwari Found my issue, looks like I wasn't in sync with the gem & node package. Interesting, would be nice if this condition were detected, it caused quite a bit of debug time |
👋 Hey all!
Is there a reason why we're not allowing webpack to run
environment/test.js
? It seems as though when runningNODE_ENV=test ./bin/webpack
, thenodeEnv
inpackage/env.js
is being overridden toproduction
.Currently, if the node env isn't a part of the whitelist (package/env.js):
it defaults to
production
(package/env.js):Would it be possible to whitelist test as well? If the package has a specific test environment we should be allowed to use it by setting the node env, imo.
I realize this is outlined in the docs but why would we still have a
package/environments/test.js
file if you cannot run it?The text was updated successfully, but these errors were encountered: