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
3.5k views
in Technique[技术] by (71.8m points)

webpack dll plugin 用在生产环境会有什么问题

react 非 ssr 项目,react/react-dom/react-router 占用了太大的体积,每次发布之后一旦 hash 变了,下载起来就会非常慢,如果使用 dll, 那么一劳永逸走缓存,除非升级 react 版本(1 年也没有一次) ,这样每次发布只变更代码层面的东西, 单独的 cdn 占用 3 个请求,太浪费了。

所以为什么不用 dll plugin

我有尝试用 splitChunks 来替代 dll plugin,但是 chunkhash 会因为各种问题进行变更,达不到缓存效果。

所以有大佬给个建议么


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

1 Answer

0 votes
by (71.8m points)
等待大神解答

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

...