diff --git a/frontend/vite.config.js b/frontend/vite.config.js index 75ea43c..34ad7c7 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -1,5 +1,4 @@ import { fileURLToPath, URL } from 'node:url' -import path from 'node:path' import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' @@ -9,11 +8,7 @@ export default defineConfig({ plugins: [vue()], resolve: { alias: { - '@': fileURLToPath(new URL('./src', import.meta.url)), - // 兜底:若 element-plus exports 解析失败则走 fallback - 'element-plus': path.resolve( - fileURLToPath(new URL('node_modules/element-plus/es/index.mjs', import.meta.url)) - ) + '@': fileURLToPath(new URL('./src', import.meta.url)) } }, server: {