码迷,mamicode.com
首页 > Web开发 > 详细

[Angular + Webpack] ES6 with BabelJS

时间:2015-09-08 16:43:22      阅读:461      评论:0      收藏:0      [点我收藏+]

标签:

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!