-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle input files that have source maps #123
Comments
I haven't tested this yet. But, it looks like the comment is being removed here |
Hm, yeah. Seems like this is supposed to remove that commend. I've set up a demo repo here: https://github.com/buschtoens/ember-fetch-sourcemap-bug When I can find the time, I'll sprinkle in some |
|
But |
So I did some debugging, seems the comment is at the end of a single line:
From 0.3 to 0.4 The dependency from Then in the
So the source-map is also being templated and mapped just as the actual file. What to do:
|
released as v3.3.1
released as v5.0.1 |
Versions of |
@kmoe thanks! I'll try to investigate. |
I'm not 100 % sure on the claims I make here, so please correct me, if I'm wrong.
It appears that input files that already have source maps attached to them are just passed through transparently, including the
sourceMappingURL
comment. This means that you will end up with a concatenated output file, that has one validsourceMappingURL
comment—the one generated bybroccoli-concat
—and possibly multiple invalidsourceMappingURL
comments somewhere in the file, that reference source maps that are not part of the output tree anymore.Adding a file to
vendor.js
viaEmberApp#import()
under the hood eventually calls this plugin and I actually tripped over this in ember-cli/ember-fetch#119.ember-fetch
also usesbroccoli-concat
to merge two files and since a source map is generated by default, the resulting concatenated file has asourceMappingURL
comment, which then gets passed through to thevendor.js
file, where it eventually wreaks havoc inbroccoli-uglify-sourcemap/lib/process-file.js#L31-L39
.The text was updated successfully, but these errors were encountered: