soulmt

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

  •  
  •   soulmt · Nov 16, 2020 · 1048 views
    This topic created in 2043 days ago, the information mentioned may be changed or developed.

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

    所以为什么不用 dll plugin

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

    所以有大佬给个建议么

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5676 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 03:44 · PVG 11:44 · LAX 20:44 · JFK 23:44
    ♥ Do have faith in what you're doing.