JonnyBurger / npx-visualize-bundle

Analyse your React Native bundle in 1 command
https://npmjs.com/package/visualize-bundle
MIT License
162 stars 8 forks source link

What are these unmapped? #5

Open KeithZhang opened 5 years ago

JonnyBurger commented 5 years ago

npx visualize-bundle downloads the bundle and sourcemap from the React Native packager. is what cannot be mapped from the sourcemap to code in the bundle. Any help on how to reduce the amount of would be appreciated! I don’t know why it happens.

levibuzolic commented 5 years ago

This is largely going to be on the React Native packager end, rather than anything to do with npx-visualize-bundle or the library it uses source-map-explorer.

These unmapped bytes can be comments and assorted bundle artefacts produced by the RN packager. A minified bundle will have a much smaller percentage of unmapped bytes due to the minification process removing a lot of these bundle artefacts.

JonnyBurger commented 5 years ago

Thanks a lot to @levibuzolic!

In my case about 2/3 of the relative size of unmapped has vanished. There are still some unmapped ones, so I'm gonna leave the issue open unless the problem @KeithZhang has been solved for you.

roots-ai commented 4 years ago

@JonnyBurger How did it vanish?

JonnyBurger commented 4 years ago

@roots-ai With @levibuzolic's PR: https://github.com/JonnyBurger/npx-visualize-bundle/pull/7

roots-ai commented 4 years ago

@JonnyBurger Thanks

eyalyoli commented 3 years ago

If I am still having umapped on --dev false?