fix(config): 替换 __dirname 为 import.meta.dirname 修复路径解析问题
ES 模块环境中不支持 __dirname,使用 import.meta.dirname 替代可确保路径解析正确。
This commit is contained in:
1 parent
3d2a2845b9
commit
5ccdfd7f06
3 files changed
+5
-5
No files matched your search
@@ -8,7 +8,7 @@ export default defineConfig(({ mode }) => {
|
||||
base: "/admin/",
|
||||
plugins: [vue()],
|
||||
resolve: {
|
||||
alias: { "@": path.resolve(__dirname, "./src") },
|
||||
alias: { "@": path.resolve(import.meta.dirname, "./src") },
|
||||
},
|
||||
server: {
|
||||
host: "0.0.0.0",
|
||||
|
||||
Reference in new issue
Block a user