Skip to content

Instantly share code, notes, and snippets.

@markodayan
Last active April 22, 2020 21:29
Show Gist options
  • Save markodayan/36e044ca08386b6bae0e8979de7c333d to your computer and use it in GitHub Desktop.
Save markodayan/36e044ca08386b6bae0e8979de7c333d to your computer and use it in GitHub Desktop.
Babel and Modern JS Builds
{
"presets": ["@babel/preset-env"]
}
npm i @babel/core @babel/cli -D
# babel preset (a set of plugins which are used to support certain language features) [so can use latest JS Features]
npm i @babel/preset-env -D
#then create file in root called .babelrc and add JSON with "presets" : ["@babel/preset-env"]
# compiling a js file into a browser compatible js file
node_modules/.bin/babel before.js -o after.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment