在项目根目录创建:vue.config.js 文件

填入内容:

module.exports = {
  publicPath: ""
};

 

 

之后build 的index.html 中的css/js 路径就都是去"/" 的相对路径访问了!

相关文章: