admin管理员组

文章数量:1325236

I try use webpack to my app, but it build my app for 60-100sec each time. How can i disable rebuild files from node_modules/* and bower_ponents/* or build them for separate chunk (per module or shared).

here is part of config:

 {
    test: /\.js$/,
    exclude: /(node_modules|bower_ponents)/,
    loaders: ['ng-annotate', 'babel-loader']
 },

and

resolve: {
    moduleDirectories: ['node_modules', 'bower_ponents']
},

How can i improve performance, by disabling rebuilding of libraries at each time?

I try use webpack to my app, but it build my app for 60-100sec each time. How can i disable rebuild files from node_modules/* and bower_ponents/* or build them for separate chunk (per module or shared).

here is part of config:

 {
    test: /\.js$/,
    exclude: /(node_modules|bower_ponents)/,
    loaders: ['ng-annotate', 'babel-loader']
 },

and

resolve: {
    moduleDirectories: ['node_modules', 'bower_ponents']
},

How can i improve performance, by disabling rebuilding of libraries at each time?

Share Improve this question asked Oct 25, 2015 at 16:15 ubombiubombi 1,1742 gold badges16 silver badges32 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 4

We need to bundle vendor scripts separately. See this answer (stackoverflow)

本文标签: javascriptWebpack build very slow because of external librariesStack Overflow