diff --git a/.env.production b/.env.production index 6bff9c9..814dbd5 100644 --- a/.env.production +++ b/.env.production @@ -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 = '' \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index b62edf9..2e01e71 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -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 }, }, { diff --git a/vite.config.js b/vite.config.js index 114e742..f50bf45 100644 --- a/vite.config.js +++ b/vite.config.js @@ -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,