From 8f44b805f62b33d7504be190ef6010fe4efbd755 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Mon, 25 Mar 2024 16:56:28 +0000 Subject: [PATCH] DEV: Use `-prod` flag when building production assets (#26344) We were previously using the `EMBER_ENV=production` environment variable, which appears to produce the same output. But, some parts of ember-cli don't seem to support it, which leads to a confusing 'Environment: development' being printed on the console. This commit adds `-prod` by default, which is the more common way to invoke ember-cli for production builds. --- lib/tasks/assets.rake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake index 8ae32f50154..584725341fa 100644 --- a/lib/tasks/assets.rake +++ b/lib/tasks/assets.rake @@ -21,7 +21,8 @@ task "assets:precompile:build" do compile_command = "NODE_OPTIONS='--max-old-space-size=2048' #{compile_command}" end - compile_command = "EMBER_ENV=production #{compile_command}" if ENV["EMBER_ENV"].nil? + ember_env = ENV["EMBER_ENV"] || "production" + compile_command = "#{compile_command} -prod" if ember_env == "production" only_ember_precompile_build_remaining = (ARGV.last == "assets:precompile:build") only_assets_precompile_remaining = (ARGV.last == "assets:precompile")