-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started with Babel
Hannah edited this page Dec 22, 2020
·
2 revisions
Babel is a toolchain that is mainly used to convert ECMAScript 2015+ code into a backwards compatible version of JavaScript in current and older browsers
Source: babeljs.io
- From the project root, run
npm ito installnode_modulesfrompackage-lock.json. - Save ES2015+ JavaScript under the
srcfolder, which is where Babel looks for JS files to compile. - Alternatively, edit the
buildandwatchscripts inpackage.jsonto direct Babel to your JS folder. - Use
npm run buildto manually compile JavaScript to thepublicfolder. - Auto-compile every time you save an update using
npm run watch.