Hamberfim / SimpleBabelNode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple Integration of Babel & Node.js:

  • npm init -y
  • npm i @babel/core @babel/node --save-dev
  • npm i @babel/preset-env --save-dev
  • create '.babelrc.json' config that only applies to a single part of a project in root next to package.json containing: { "presets": [["@babel/preset-env"]] }
  • alternative is to use babel.config.json
  • add to package.json: "scripts": { "start": "babel-node index.js"
  • run npm start in terminal

About


Languages

Language:JavaScript 100.0%