react-native-bundle-visualizer
react-native-bundle-visualizer copied to clipboard
Running bundle visualizer in Expo project using Expo Router
I'm getting the following error when trying to run bundle visualizer:
Error: The resource /Users/............../expo-router/entry was not found.
Has anyone run on this issue before?
confirmed here as well
❯ npx react-native-bundle-visualizer
Generating bundle...
Welcome to Metro v0.76.8
Fast - Scalable - Integrated
Error: The resource `/Users/.../expo-router/entry` was not found.
at /Users/.../node_modules/metro/src/IncrementalBundler.js:276:24
=== error === Error: Command failed with exit code 1:
I think it's the same as https://github.com/IjzerenHein/react-native-bundle-visualizer/issues/93 we need to change the path of the sourcemap somehow
I have a solution to this - will update here briefly.
@flexbox @RobertPetricevic
- Run
npx expo export -p web --dump-sourcemapin your project. This will create a dist directory with your exported project along with the sourcemaps. - Run
npx source-map-explorer dist/**/*.jsto get the graphic representation of your sourcemaps.
@mojavad Nice hack! thanks for sharing