diff --git a/lib/tasks/webpacker/compile.rake b/lib/tasks/webpacker/compile.rake index db5970bb7..b8422cd41 100644 --- a/lib/tasks/webpacker/compile.rake +++ b/lib/tasks/webpacker/compile.rake @@ -26,7 +26,7 @@ end namespace :webpacker do desc "Compile JavaScript packs using webpack for production with digests" task compile: ["webpacker:verify_install", :environment] do - Webpacker.with_node_env("production") do + Webpacker.with_node_env(ENV.fetch("NODE_ENV", "production")) do ensure_log_goes_to_stdout do if Webpacker.compile # Successful compilation!