Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.0k views
in Technique[技术] by (71.8m points)

webpack如何对输出文件拆分?

需要把output拆分 而不是chunk
感觉用CommonsChunkPlugin不对

有没有相应的plugin呢?

另外:我把一个大的js拆分成几个小的 再网站加载的时候会不会并发下载而缩短加载时间呢?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

不会,js加载是同步请求,一个加载完才会加载另一个。一个大js反而比几个小的要快。拆的前提是不影响页面呈现,如果第二个,第三个不加载页面都出不来,还是不要拆了


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...