I start with babel.js to use the ES6 JavaScript features, however I ran into a problem
I am currently creating my application using a browser and repeating it with the following command.
browserify -t reactify app/main.js -o public/scripts/bundle.js
Now I want to use the equivalent command in babel to combine my required ES6 modules into bundle.js . This will not work just providing me the main.js file for ES5.
babel app/main.js -o public/scripts/bundle.js
However, I could compile my bundle.js file into ES6 version with babel with 2 commands
browserify -t reactify app/main.js -o public/scripts/bundle.js babel app/main.js -o public/scripts/babel.js
Is this the right way to use babel with a browser? combine your modules using a browser and then convert the package to ES6?
steven iseki
source share