- Remove /admin path prefix (using admin.protdskj.top subdomain instead) - Change pnpm install to --no-frozen-lockfile for lockfile compatibility - Simplify admin Nginx config to standard SPA serving 🤖 Generated with [Qoder][https://qoder.com]
21 lines
647 B
TypeScript
21 lines
647 B
TypeScript
import { defineConfig } from 'vite';
|
|
import vue from '@vitejs/plugin-vue';
|
|
import { resolve } from 'path';
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
resolve: {
|
|
// 避免 src 内遗留的 .js 抢先于 .ts/.vue 被解析(曾导致 i18n 文案缺失)
|
|
extensions: ['.mjs', '.ts', '.mts', '.tsx', '.vue', '.js', '.jsx', '.json'],
|
|
dedupe: ['echarts', 'vue-echarts', 'vue'],
|
|
},
|
|
optimizeDeps: {
|
|
include: ['echarts', 'vue-echarts'],
|
|
},
|
|
publicDir: resolve(__dirname, '../../packages/shared/public'),
|
|
server: {
|
|
port: 5174,
|
|
proxy: { '/api': { target: 'http://localhost:3000', changeOrigin: true } },
|
|
},
|
|
});
|