assets:compile doesn't respect NODE_ENV · Issue #1395 · rails/webpacker
It seems that NODE_ENV=development bundle exec rails assets:precompile ignores NODE_ENV environment variable. In order to confirm the problem, I added simple debug code to config/webpack/production...