React + Redux 部署经验小结

2016-03-09 10:03:32 +08:00
 hustlzp
http://hustlzp.com/post/2016/03/react-redux-deployment

欢迎 V 友们提建议。
4866 次点击
所在节点    程序员
14 条回复
sokis
2016-03-09 10:26:44 +08:00
已阅
paulagent
2016-03-09 10:33:30 +08:00
thanks
sox
2016-03-09 11:03:25 +08:00
Long term caching 并不麻烦啊, filename: "output.[hash].bundle.js" 就完了
crazyxin1988
2016-03-09 11:09:23 +08:00
webpack 支持 chunkhash
feilaoda
2016-03-09 11:45:45 +08:00
很好,对我这前端渣有帮助
moxiaonai
2016-03-09 12:56:29 +08:00
支持,赞一个
hustlzp
2016-03-09 13:48:23 +08:00
@sox 请问下如何自动将 output.[hash].bundle.js 填到 HTML 中?这个我还没搞太清楚。
sox
2016-03-09 16:47:15 +08:00
Option 1:

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

Option 2:

https://github.com/ampedandwired/html-webpack-plugin 会可以生成一个包含 <script> <link> 的 html
hustlzp
2016-03-09 16:56:47 +08:00
@sox Thanks!
saturnast
2016-03-09 17:00:01 +08:00
HUST...
hkongm
2016-03-09 18:02:56 +08:00
为了 @sox 的回复,收藏 topic
hustlzp
2016-03-09 18:08:52 +08:00
@sox 博客挺不错的~
hustlzp
2016-03-09 18:10:57 +08:00
sox
2016-03-09 18:15:25 +08:00
@hustlzp 👍😄

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/262096

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX