build(vite): resolve @/ alias in main + preload configs

The four renderer vite configs all resolve "@" to ./src; main and preload
didn't, so any main-reachable file using @/ imports would break the
bundle. Mirror the same alias block in both configs and revert
lib/errors.ts + src/main/* to the project's @/ convention.
This commit is contained in:
Claude
2026-04-21 01:56:53 +00:00
parent 58fdf0cf5d
commit ac6d5906eb
5 changed files with 16 additions and 4 deletions
+6
View File
@@ -1,7 +1,13 @@
import path from "path";
import { defineConfig } from 'vite';
import { defineEnv } from './vite.env';
// https://vitejs.dev/config
export default defineConfig({
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
define: defineEnv,
});