Optimize: tsconfig - optimize alias config

This commit is contained in:
2024-03-15 15:29:33 +08:00
parent 715806b85d
commit de3d1831d0
7 changed files with 39 additions and 56 deletions

View File

@@ -1,4 +1,4 @@
import { resolve } from 'path'
import { fileURLToPath, URL } from 'node:url'
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
import react from '@vitejs/plugin-react'
import AutoImport from 'unplugin-auto-import/vite'
@@ -82,7 +82,7 @@ export default defineConfig({
],
resolve: {
alias: {
'@': resolve('src/renderer/src')
'@': fileURLToPath(new URL('./src/renderer/src', import.meta.url))
}
}
}