标签:
Install:
npm install --save-dev babel-loader
webpack.config.js:
Add module, tell webpack to find all js file and use babel as loader, exclude all files in node_modules
module.exports = { entry: { app: [‘./app/index.js‘] }, output: { path: ‘./build‘, filename: ‘bundle.js‘ }, module: { loaders: [ {test: /\.js$/, loader: ‘babel‘, exclude: /node_modules/} ] } };
[Angular + Webpack] ES6 with BabelJS
标签:
原文地址:http://www.cnblogs.com/Answer1215/p/4792189.html