V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
hustlzp
V2EX  ›  程序员

React + Redux 部署经验小结

  •  
  •   hustlzp ·
    hustlzp · 2016-03-09 10:03:32 +08:00 · 4848 次点击
    这是一个创建于 2961 天前的主题,其中的信息可能已经有所发展或是发生改变。
    14 条回复    2016-03-09 18:15:25 +08:00
    sokis
        1
    sokis  
       2016-03-09 10:26:44 +08:00
    已阅
    paulagent
        2
    paulagent  
       2016-03-09 10:33:30 +08:00
    thanks
    sox
        3
    sox  
       2016-03-09 11:03:25 +08:00
    Long term caching 并不麻烦啊, filename: "output.[hash].bundle.js" 就完了
    crazyxin1988
        4
    crazyxin1988  
       2016-03-09 11:09:23 +08:00
    webpack 支持 chunkhash
    feilaoda
        5
    feilaoda  
       2016-03-09 11:45:45 +08:00
    很好,对我这前端渣有帮助
    moxiaonai
        6
    moxiaonai  
       2016-03-09 12:56:29 +08:00
    支持,赞一个
    hustlzp
        7
    hustlzp  
    OP
       2016-03-09 13:48:23 +08:00
    @sox 请问下如何自动将 output.[hash].bundle.js 填到 HTML 中?这个我还没搞太清楚。
    sox
        8
    sox  
       2016-03-09 16:47:15 +08:00   ❤️ 1
    Option 1:

    https://github.com/sporto/assets-webpack-plugin 会生成一个包含这些 hash 的 json 文件

    Option 2:

    https://github.com/ampedandwired/html-webpack-plugin 会可以生成一个包含 <script> <link> 的 html
    hustlzp
        9
    hustlzp  
    OP
       2016-03-09 16:56:47 +08:00
    @sox Thanks!
    saturnast
        10
    saturnast  
       2016-03-09 17:00:01 +08:00
    HUST...
    hkongm
        11
    hkongm  
       2016-03-09 18:02:56 +08:00
    为了 @sox 的回复,收藏 topic
    hustlzp
        12
    hustlzp  
    OP
       2016-03-09 18:08:52 +08:00
    @sox 博客挺不错的~
    hustlzp
        13
    hustlzp  
    OP
       2016-03-09 18:10:57 +08:00
    sox
        14
    sox  
       2016-03-09 18:15:25 +08:00
    @hustlzp 👍😄
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5954 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 47ms · UTC 02:00 · PVG 10:00 · LAX 19:00 · JFK 22:00
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.