1:vue.config.js 配置文件
vueConfig 中 或者是 module.exports 中 添加 publicPath: './'
2:src->router->index.js中 将history更改为hash访问模式
export default new Router({
mode: 'hash', // history hash
routes: constantRouterMap
})3:更换CDN加载模式
我是在打包完成后 直接在index.html中将 //cdn 替换成了 http://cdn
还见到有些方式 是在index.html引用相关模块 删除代码中的import
应该有更好的解决方案 空了再研究
版权声明:本文为x1a0x0原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。