WebPack - Babel
$ yarn add -D webpack webpack-cli
$ yarn add -D babel-core babel-loader babel-preset-env
$ vi babel.config.json
{
"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;
package.json
"webpack": "webpack"
$ yarn webpack