From 484d58b88d9096dd5f14d21be74c0192b1f8d354 Mon Sep 17 00:00:00 2001 From: Sylvia Crowe Date: Sat, 22 Jun 2024 00:44:37 -0700 Subject: [PATCH] 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 --- electron.vite.config.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/electron.vite.config.ts b/electron.vite.config.ts index 94e1ffbb..ed055702 100644 --- a/electron.vite.config.ts +++ b/electron.vite.config.ts @@ -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: ".",