A platform for community discussion. Free, open, simple.
DEV: Do not run ember-cli output through terser again (#15889)
David Taylorabefb1beffce
diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rakeindex 00ad394cc7d..d10fd897790 100644--- a/lib/tasks/assets.rake+++ b/lib/tasks/assets.rake@@ -38,8 +38,7 @@ task 'assets:precompile:before' doif ENV['EMBER_CLI_PROD_ASSETS'] != "0"# Remove the assets that Ember CLI will handle for usRails.configuration.assets.precompile.reject! do |asset|- asset.is_a?(String) &&- (%w(application.js admin.js ember_jquery.js pretty-text-bundle.js start-discourse.js vendor.js).include?(asset))+ asset.is_a?(String) && is_ember_cli_asset?(asset)endendend@@ -82,6 +81,11 @@ task 'assets:flush_sw' => 'environment' doendend+def is_ember_cli_asset?(name)+ return false if ENV['EMBER_CLI_PROD_ASSETS'] == '0'+ %w(application.js admin.js ember_jquery.js pretty-text-bundle.js start-discourse.js vendor.js).include?(name)+end+def assets_path"#{Rails.root}/public/assets"end@@ -162,6 +166,7 @@ enddef max_compress?(path, locales)return false if Rails.configuration.assets.skip_minification.include? path+ return false if is_ember_cli_asset?(path)return true unless path.include? "locales/"path_locale = path.delete_prefix("locales/").delete_suffix(".js")