We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Our system has three stages: development, staging Thus we need three separate webpack config
RAILS_ENV controls what configuration webpacker will use using webpacker.yml NODE_ENV controls what webpacker will use to customize webpack config
It works as expected when deploying in production But when NODE_ENV is set to staging, webpack config seems to always loads production.js
After some digging, I found that node_env is forced to "production" when deploying
webpacker/lib/tasks/webpacker/compile.rake
Line 29 in c506521
But under our scenario we need node_env other then production (even when deploying)
A customizable property in webpacker.yml that can assign what node_env we're using (or what webpack config custom file to use)
The text was updated successfully, but these errors were encountered:
‘staging’ is not a valid ‘NODE_ENV’. If you are deploying to a staging server I would recommend setting it to ‘production’.
There are several other issues discussing this at length, it would probably be better to actively talk about this on one of those.
Sorry, something went wrong.
Duplicate of #1395 #1558 #1696
No branches or pull requests
Scenario
Our system has three stages: development, staging
Thus we need three separate webpack config
What Happened
RAILS_ENV controls what configuration webpacker will use using webpacker.yml
NODE_ENV controls what webpacker will use to customize webpack config
It works as expected when deploying in production
But when NODE_ENV is set to staging, webpack config seems to always loads production.js
After some digging, I found that node_env is forced to "production" when deploying
webpacker/lib/tasks/webpacker/compile.rake
Line 29 in c506521
But under our scenario we need node_env other then production (even when deploying)
Possible solution
A customizable property in webpacker.yml that can assign what node_env we're using (or what webpack config custom file to use)
The text was updated successfully, but these errors were encountered: