This commit is contained in:
hzz 2025-03-25 17:06:16 +08:00
parent fcdd14f0f4
commit 43cfd148e0
3 changed files with 3 additions and 19 deletions

View File

@ -10,6 +10,6 @@ VITE_APP_BASE_API = '/prod-api'
# 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip
VITE_PUBLIC_BASE_PATH = '/ras-web'
VITE_PUBLIC_BASE_PATH = ''
VITE_APP_WS_API = ''

View File

@ -75,6 +75,7 @@ export const constantRoutes = [
path: '/screen',
component: ScaleScreen,
redirect: 'noredirect',
meta: { title: '大屏', icon: 'dashboard', affix: true },
children: [
// {
// path: "/screen/R_D_Environment",
@ -86,7 +87,7 @@ export const constantRoutes = [
path: "R_D_Environment",
name: "R_D_Environment",
component: () => import("../views/screen/R_D_Environment/index.vue"),
hidden: true
meta: { title: '研发中心环境', icon: 'dashboard', affix: true },
},
{

View File

@ -24,23 +24,6 @@ export default defineConfig(({ mode, command }) => {
// https://cn.vitejs.dev/config/#resolve-extensions
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
},
publicDir: false, // 禁用默认的public目录复制
build: {
rollupOptions: {
plugins: [
copy({
targets: [
{
src: 'public/*', // 复制public下所有内容
dest: 'dist/ras-web' // 输出到dist/static目录相对于build.outDir
}
],
hook: 'writeBundle' // 在打包完成后执行复制
})
]
},
assetsDir: 'ras-web/assets',
},
// vite 相关配置
server: {
port: 80,