Is it practical to use watchify with babelify?
I'm trying out React and running a project in dev mode with:
watchify app/src/src.js -t babelify -o app/build/build.js
I expect watchify to look for changes on src.js and compile a functional build.js with all the required modules and use babelify to compile the jsx parts of the script.
But that seems to take a lot of time, and I end up with a 19000 lines build for my one line script:
var React = require('react');
Is there a better way?
That is correct. The React library is approximately 19000 lines long.
Browserify will bundle all your dependencies together.
If you don't need React then don't require it in.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With