最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Webpack build very slow because of external libraries - Stack Overflow

programmeradmin1浏览0评论

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)

发布评论

评论列表(0)

  1. 暂无评论