-
Notifications
You must be signed in to change notification settings - Fork 973
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
Specify node_env before running build web #1755
Conversation
I know I blocked merging this, but I have to resolve conflicts in build.js anyway. Gonna merge! |
Would this explain, why accessing https://redwoodjs.com/docs/environment-variables#where-does-redwood-load-my-environment-variables isn't very clear if it really applies to all |
Correct - NODE_ENV will always be overridden to production when you build and serve. |
might be worth documenting on the env var docs |
Small change to make sure all downstream loaders/plugins for webpack receive NODE_ENV as production when running
yarn rw build web
This takes care of a lot of weird issues that arise, such as Tailwind not minifying (unless you're lucky, and your build environment has NODE_ENV production by default).