mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-21 16:38:23 +01:00
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:
parent
c2b8b32b44
commit
484d58b88d
@ -5,6 +5,7 @@ import react from "@vitejs/plugin-react";
|
|||||||
import { defineConfig } from "electron-vite";
|
import { defineConfig } from "electron-vite";
|
||||||
import { viteStaticCopy } from "vite-plugin-static-copy";
|
import { viteStaticCopy } from "vite-plugin-static-copy";
|
||||||
import tsconfigPaths from "vite-tsconfig-paths";
|
import tsconfigPaths from "vite-tsconfig-paths";
|
||||||
|
import path from "path";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
main: {
|
main: {
|
||||||
@ -18,6 +19,11 @@ export default defineConfig({
|
|||||||
outDir: "dist/main",
|
outDir: "dist/main",
|
||||||
},
|
},
|
||||||
plugins: [tsconfigPaths()],
|
plugins: [tsconfigPaths()],
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
"@": path.resolve(__dirname, "./frontend"),
|
||||||
|
},
|
||||||
|
}
|
||||||
},
|
},
|
||||||
preload: {
|
preload: {
|
||||||
root: ".",
|
root: ".",
|
||||||
|
Loading…
Reference in New Issue
Block a user