What are the unmaped bytes in source map explorer

Viewed 1715

When I use source map explorer https://github.com/danvk/source-map-explorer to checkout what is in a bundle, I got the following output:

D:\projects\angular\mTracker\dist>source-map-explorer --tsv main.bundle.js main.bundle.js.map
Unable to map 27638 / 58878 bytes (46.94%)

What are the bytes that are unable to map? I could not find explanation on this?

1 Answers

Usually it is your bundler adding code which it needs to make bundle work as one file, but does not have direct source code. Sometimes it is created by TypeScript compiler when downleveling code.

I made command in my bobril-build tool, which allows visualise js source code which does not have source.

npm install bobril-build -g
bb js sourcemap main.bundle.js

it will create main.bundle.js.sourcemap.html which show unmapped or no source with red background.

Related