Skip to content

Instantly share code, notes, and snippets.

@HamidOsouli-zz
Last active April 13, 2021 06:50
Show Gist options
  • Save HamidOsouli-zz/f48bc042995b18d2436dd372e72e4647 to your computer and use it in GitHub Desktop.
Save HamidOsouli-zz/f48bc042995b18d2436dd372e72e4647 to your computer and use it in GitHub Desktop.

ES6 Setup with Babel 7

npm init -y
npm i --save-dev nodemon
npm install --save-dev @babel/core @babel/cli @babel/preset-env @babel/node

Create a .babelrc config in your project root. Insert the following

{
  "presets": ["@babel/preset-env"]
}

In package.json add this to scipts:

"dev": "nodemon --exec babel-node index.js"

To run: npm run dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment