feat: 使用vite-tsconfig-paths插件

This commit is contained in:
2025-09-19 10:04:13 +08:00
parent 668e851e9b
commit 3469baf469
4 changed files with 45 additions and 7 deletions

View File

@@ -1,9 +1,9 @@
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import checker from 'vite-plugin-checker'
import vueDevTools from 'vite-plugin-vue-devtools'
import tsconfigPaths from 'vite-tsconfig-paths'
// https://vite.dev/config/
export default defineConfig({
@@ -18,10 +18,6 @@ export default defineConfig({
eslint: { useFlatConfig: true, lintCommand: 'eslint "./src/**/*.{ts,tsx,vue}"' },
vueTsc: true,
}),
tsconfigPaths(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
})