- 链接带参数
- 运维层面处理html强制不缓存【etag等相关HTTP缓存】【推荐】
- html内js就是一个动态的【保证足够轻量】【assets-webpack-plugin 这插件了解一下】
<script>
document.write('<script src="/js/webpack-assets.js?v=' + Math.random() + '"><\/script>');
document.write('<script src="' + window.WEBPACK_ASSETS['common'].js + '"><\/script>');
document.write('<script src="' + window.WEBPACK_ASSETS['main'].js + '"><\/script>');
</script>
window.WEBPACK_ASSETS = {
"common": {
"js": "/js/common.967e0128.chunk.js"
},
"main": {
"css": "/css/initial.main.967e0128.css",
"js": "/js/main.967e0128.bundle.js"
}
}