DEV: Ensure Embroider sourcemaps are collected by Sprockets (#23468)

Names of sourcemaps are not necessarily equal to the js file names. Instead, we can check the `sourceMappingURL` comment to find the map's filename.
This commit is contained in:
David Taylor
2023-09-07 22:20:52 +01:00
committed by GitHub
parent 754cd9cd22
commit 75ce01a69b
2 changed files with 7 additions and 3 deletions

View File

@ -59,6 +59,10 @@ module EmberCli
{}
end
def self.parse_source_map_path(file)
File.read("#{dist_dir}/assets/#{file}")[%r{^//# sourceMappingURL=(.*)$}, 1]
end
def self.is_ember_cli_asset?(name)
assets.include?(name) || name.start_with?("chunk.")
end