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
应该有更好的解决方案 空了再研究