打包排除public文件

This commit is contained in:
张宁 2024-07-01 17:55:41 +08:00
parent aedcf388e8
commit 35b1466a2c
2 changed files with 5 additions and 1 deletions

View File

@ -68,7 +68,8 @@ axios.interceptors.response.use(
if (error.response.status == UtilVar.code) { if (error.response.status == UtilVar.code) {
// router.push("/login") // router.push("/login")
// 目前放测试地址 发布后放到正是地址---待修改 // 目前放测试地址 发布后放到正是地址---待修改
window.location.href = 'http://nclg.yx.zheke.com/#/login'; // window.location.href = 'http://nclg.yx.zheke.com/#/login';
window.location.href = window.location.origin + '/#/login';
return Promise.resolve(response); return Promise.resolve(response);
} }

View File

@ -70,6 +70,9 @@ export default defineConfig(({ command, mode }: ConfigEnv): UserConfig => {
}, },
build: { build: {
outDir: 'dist', outDir: 'dist',
rollupOptions: {
external: ['/public'], // 替换为你要排除的模块名称
},
}, },
} }