Closed punksta closed 3 years ago
To understand your request better, I'd like to understand how you use this on CI. What output format are you targeting and how do you use the output on CI?
Currently I am targeting html format and just adding it into GA artifacts. If bundle size increased at a threshold devs can download artifacts and investigate it.
I am using release bundle from android/app/build/generated/
so I don't need to build JS again.
Currently I am targeting html format and just adding it into GA artifacts. If bundle size increased at a threshold devs can download artifacts and investigate it.
Ah I see, yeah seems like a good use-case
So, I don't have any plans on implementing this myself, but if you would like to provide a PR, I'll consider it.
The bulk of what rnbv does is to bundle and then it runs it through the source-map-explorer. You could probably also write a simple script that calls the source-map-explorer with the bundle and map-file. https://github.com/IjzerenHein/react-native-bundle-visualizer/blob/master/src/react-native-bundle-visualizer.js#L126-L138
Looks like I can just do npx source-map-explorer index.android.bundle index.android.bundle.map
:)
Thank you!
Even better :) 👍
I would like to pass existing bundle and sourcemap as arguments, so I don't build JS bundle twice on CI.
npx react-native-bundle-visualizer --bundle-path index.android.bundle --source-maps index.android.bundle.map