-
Notifications
You must be signed in to change notification settings - Fork 19
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
empty source-map files incorrectly considered invalid #4
Comments
I vaguely remember making empty sourcemaps fail because they're usually a sign of programmer error... similar to how compilers will warn if you have dead code, and how git doesn't let you make empty commits (without the Rather than make them valid, maybe we should have the error be something like "Warning: The sourcemap appears to be empty. You can set allowEmpty=true to suppress this warning." and then add the option to the validator. What are your thoughts? |
The assertion "is this the right source-map" is different from "is this a valid source-map". Today this module only tests "is this a valid source-map", the exception to this is the assumption "empty map" is invalid. Now, I do see the value in this case. So let me propose:
|
I think the proposal is a good one, and is consistent with the behavior of similar tools. |
It seems that valid, but empty source-map files are considered invalid. sourcemaps.io appears to agree they are valid, just empty.
https://sourcemaps.io/validate?url=https%3A%2F%2Fgist.githubusercontent.com%2FTurbo87%2Fe39b740c872227698227d3fc7005ad36%2Fraw%2Fdc5f1ca29a8bb98030f63773cc2c4561026711ea%2Fnothing.js
related: broccolijs/broccoli-concat#51 (comment)
I can submit a PR you agree. If not, would love to here your thoughts on this.
The text was updated successfully, but these errors were encountered: