解决vue build后不兼容IOS11以下版本,并清理index缓存

* build --> webpack.prod.conf.js --> UglifyJsPlugin添加关于mangle的选项

mangle: {
    safari10: true
}

* 打包好的index.html放到服务器里去的时候,index.html在服务器端可能是有缓存的,这需要在服务器配置不让缓存index.html

* nginx 配置如下

location = /index.html {
    add_header Cache-Control "no-cache, no-store";
}

猜你喜欢

转载自www.cnblogs.com/kelly07/p/10431187.html
今日推荐