Vue-cli4 项目部署遇到的问题

问题1:html

主页面index.html加载失败,缘由是资源上下文不正确,vue.config.js配置一下上下文就行了,配置以下:vue

module.exports = {vue-router

publicPath: process.env.NODE_ENV === 'production'? '/monitor/' : '/'ide

};router

问题2:htm

 

问题的缘由是  vue-Li4脚手架  vue-router 默认路由mode是history 兼容性很差  改为hash模式就能够了!blog

相关文章
相关标签/搜索