I'm new to babel today, and I was unable to compile the code after following this setup guide.
After googling for a while, I found that babel now needs presets to compile.
Install babel as local installation, not global (for project management).
Mention about presets and .babelrc file.
Adding this line might be better. npm install babel-preset-es2015 --save-dev echo '{ "presets": ["es2015"] }' > .babelrc
First of all, thanks for the great tutorial.
I'm new to babel today, and I was unable to compile the code after following this setup guide. After googling for a while, I found that babel now needs
presets
to compile.So, I suggest to update setup guide to official setup guide.
presets
and.babelrc
file.Adding this line might be better.
npm install babel-preset-es2015 --save-dev
echo '{ "presets": ["es2015"] }' > .babelrc