Closed justin808 closed 2 years ago
Per https://nodejs.dev/learn/nodejs-the-difference-between-development-and-production
Generally, the only value that matters for NODE_ENV is production.
~Given the old code, I suspect that many people ran rake assets:precompile and had the NODE_ENV incorrectly set to 'development' for production builds.~
rake assets:precompile
Actually, for running the rake task to build, https://github.com/rails/webpacker/blob/master/lib/tasks/webpacker/compile.rake#L23 sets the NODE_ENV to production if not set.
This is great, maybe we should talk about RACK_ENV removal in the upgrade docs?
RACK_ENV
@guillaumebriday where in the docs?
Per https://nodejs.dev/learn/nodejs-the-difference-between-development-and-production
Generally, the only value that matters for NODE_ENV is production.
~Given the old code, I suspect that many people ran
rake assets:precompile
and had the NODE_ENV incorrectly set to 'development' for production builds.~Actually, for running the rake task to build, https://github.com/rails/webpacker/blob/master/lib/tasks/webpacker/compile.rake#L23 sets the NODE_ENV to production if not set.