fix: resolve frontend paths correctly on windows

For some reason, @ paths in emain.ts weren't resolving automatically on
windows. This has been fixed by specifying it in electron.vite.config.ts
This commit is contained in:
Sylvia Crowe 2024-06-22 00:44:37 -07:00
parent c2b8b32b44
commit 484d58b88d

View File

@ -5,6 +5,7 @@ import react from "@vitejs/plugin-react";
import { defineConfig } from "electron-vite";
import { viteStaticCopy } from "vite-plugin-static-copy";
import tsconfigPaths from "vite-tsconfig-paths";
import path from "path";
export default defineConfig({
main: {
@ -18,6 +19,11 @@ export default defineConfig({
outDir: "dist/main",
},
plugins: [tsconfigPaths()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./frontend"),
},
}
},
preload: {
root: ".",