sourceMappingURL comment included in unmapped size
See original GitHub issueDescription The number of unmapped bytes changes with the filename of the source map file.
Steps to reproduce
- Build any bundle with a source map
- Load
source-map-explorer
, save the number of unmapped bytes - Change the name of the source map itself and the name inside
sourceMappingURL
comment inside the bundle - Load
source-map-explorer
- See a different number of unmapped bytes
Files to reproduce It’s a TAR archive, despite the name. dist.zip
Expected behavior Unmapped bytes number does not depend on the name length of the source map file.
Environment
- OS: MacOS X 10.14.6, node 11.15.0
- source-map-explorer 2.0.1
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Analyzing Angular bundle with Source Map Explorer
As far as I know, duplicated bundles does not increase bundle size. They should be included once if imported in many places. 1 ......
Read more >Troubleshooting Source Maps for JavaScript
Verify sourceMappingURL is present. Some CDNs automatically strip comments from static files, including JavaScript files. This can have the effect of stripping ...
Read more >API - esbuild
This mode means the source map is appended to the end of the .js output file as a base64 payload inside a //#...
Read more >Warning: -file- is being assigned a //# sourceMappingURL, but ...
There are two ways to assign a source map, either by using a comment or by setting a header to the JavaScript file....
Read more >source-map-explorer: Versions - Openbase
#143 Broken bundle selection on Windows environments; #133 sourceMappingURL comment included in unmapped size. Add sourceMappingURL as a separate virtual ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
On second thought, I think we should include source map comment into size analysis. One of key use cases of SME - figure out what takes most space in the bundle size. Seeing that bundle contains an inline source map might help to reduce the bundle size
But we should also add an option to exclude source map comments from size calculation. This way the user decides and aware that the result size might be smaller. @danvk, regarding message in the console - I’m not sure we should add one. Look at the deluge of confusion caused by “Your source map only contains one source” message.