IjzerenHein / react-native-bundle-visualizer

See what packages are increasing your react-native bundle size 📦
MIT License
1.44k stars 42 forks source link

Support running using npx #8

Closed brunolemos closed 4 years ago

brunolemos commented 6 years ago

It should not be required to save as a dev dependency.

This should work: npx react-native-bundle-visualizer

But it gives: /Users/me/.npm/_npx/83500/bin/react-native-bundle-visualizer: line 9: ./node_modules/.bin/haul: No such file or directory

IjzerenHein commented 6 years ago

I've never heard of npx but it looks really cool. Maybe if other people are also interested in this, I'll take a stab at supporting this.

brunolemos commented 6 years ago

It is built in on npm since 5.2 so I believe more and more people are starting to use it.

Eyesonly88 commented 5 years ago

@brunolemos I have it as a devDependency and it works for me.

image

I had to add react-hot-loader as a devDep as well. I'm using node v8.12.0 and RN 57.1

IjzerenHein commented 4 years ago

As of version 2.0.3 (pre-release) it is now possible to run this module using npx. Version 2 will be released shortly. You can already test it using npx react-native-bundle-visualizer@next.

IjzerenHein commented 4 years ago

V2 has been released as the new official version and npx is now the preferred method to run this package. Thanks for the suggestion 👍 Closing this now, cheers