diff --git a/tsconfig.json b/tsconfig.json index 0f0a605..e25c3b1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,10 +4,15 @@ "jsx": "preserve", "lib": ["ES2020", "DOM", "DOM.Iterable"], "useDefineForClassFields": true, + + "baseUrl": ".", "module": "ESNext", /* Bundler mode */ "moduleResolution": "bundler", + "paths": { + "@/*": ["src/*"] + }, "resolveJsonModule": true, "allowImportingTsExtensions": true, @@ -19,6 +24,7 @@ "noEmit": true, "isolatedModules": true, "skipLibCheck": true + }, "references": [{ "path": "./tsconfig.node.json" }], "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"] diff --git a/vite.config.ts b/vite.config.ts index 39d7ecc..952b842 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,3 +1,4 @@ +import { resolve } from 'node:path' import { env } from 'node:process' import vue from '@vitejs/plugin-vue' @@ -11,7 +12,7 @@ export default defineConfig(async () => ({ plugins: [vue(), UnoCSS()], resolve: { alias: { - '@': '/src', + '@': resolve(__dirname, 'src'), }, }, // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`