mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:01:26 +08:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user