DEV: Correctly identify Embroider chunks (#23488)

This method is used by assets:precompile to decide whether to apply `terser` to a file. Embroider chunks do not necessarily start with `chunk.`, and so they were incorrectly being re-terser'd by our assets:precompile task. This is inefficient, and also led to broken sourcemaps on some assets.
This commit is contained in:
David Taylor 2023-09-10 10:18:43 +01:00 committed by GitHub
parent e813109c18
commit 231ea8faa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,7 @@ module EmberCli
end
def self.is_ember_cli_asset?(name)
assets.include?(name) || name.start_with?("chunk.")
assets.include?(name) || script_chunks.values.flatten.include?(name.delete_suffix(".js"))
end
def self.ember_version