webpack.config.js 563 Bytes
/**
 * weboack configuration
 * @author: xuqi<qi.xu@yoho.cn>
 * @date: 2016/3/29
 */

var webpack = require('webpack');

module.exports = {
    watch: true,
    module: {
        loaders: [
            {
                test: /\.js$/i,
                exclude: /node_modules/,
                loader: 'babel'
            }
        ]
    },
    plugins: [
        new webpack.optimize.CommonsChunkPlugin({
            name: 'lib',
            minChunks: 2
        })
    ],
    babel: {
        presets: ['es2015'],
        plugins: ['transform-runtime']
    }
};