1、vue.config.js中
module.exports = {
?// 基本路徑
? publicPath: cdn地址,
? // 輸出文件目錄
? outputDir: "dist",
}
2、router/index.js中
const router = new VueRouter({
? // base: process.env.BASE_URL,//去除base防止window.open()打開的頁面中被拼接base導致404
? routes: constantRoutes,
});