npm init -y
npm i --save-dev nodemon
npm add babel-preset-env babel-cli
Create a .babelrc
config in your project root. Insert the following
{
"presets": ["env"]
}
In package.json
add this to scripts
:
"dev": "nodemon --exec babel-node index.js"
To run: npm run dev
If you want to use it with Babel 7, you can use it here :https://gist.github.com/HamidOsouli/f48bc042995b18d2436dd372e72e4647