WebPack - Babel


# npm install --save-dev babel-core babel-loader babel-preset-env
# vi .babelrc
{
"presets": ["babel-preset-env"]
}
# vi webpack.config.js
const path = require('path');
const config = {
entry: './src/index.js',
output: {
path: path.resolve(__dirname, 'build'),
filename: 'bundle.js'
}
};
module.exports = config;
# npm run build