1
回答
webpack编译速度极慢
华为云实践训练营,热门技术免费实践!>>>   
module.exports = {
    entry: {
        "public/js/claim/chc-claim-result-detail"        : __dirname + "/../datebaoladder-front/public/js/claim_src/chc-claim-result-detail"

    },
    output: {
        path: __dirname ,
        filename: '[name].js',
    },
    resolve: {
        extensions: ['', '.js', '.jsx']
    },
   // devtool: "#source-map",
    module: {
        loaders: [
            {
                test: /\.js$/,
                exclude: /node_modules/,
                loader: 'babel',
                query: {
                    presets: ['react', 'es2015']
                }
            }
        ]
    }
    //,watch:true
}

编译一次大概40s,怎么破



举报
eatnothing
发帖于1年前 1回/471阅
顶部