Skip to content

Commit 7cb2833

Browse files
committed
fix local alias path resolution for windows
1 parent 481e146 commit 7cb2833

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

electron.vite.config.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
import path from 'path';
2-
import { defineConfig, externalizeDepsPlugin } from 'electron-vite';
3-
import { nodePolyfills } from 'vite-plugin-node-polyfills';
1+
import path from "path";
2+
import { defineConfig, externalizeDepsPlugin } from "electron-vite";
3+
import { nodePolyfills } from "vite-plugin-node-polyfills";
44

55
export default defineConfig({
66
main: {
77
plugins: [externalizeDepsPlugin()],
88
resolve: {
99
alias: {
10-
'@/': path.join(__dirname, 'src/'),
10+
"@": path.join(__dirname, "src"),
1111
},
1212
},
1313
},
1414
preload: {
1515
resolve: {
1616
alias: {
17-
'@/': path.join(__dirname, 'src/'),
17+
"@": path.join(__dirname, "src"),
1818
},
1919
},
2020
},
2121
renderer: {
2222
plugins: [
2323
nodePolyfills({
24-
include: ['path', 'fs', 'constants', 'stream', 'util', 'zlib'],
24+
include: ["path", "fs", "constants", "stream", "util", "zlib"],
2525
}),
2626
],
2727
resolve: {
2828
alias: {
29-
'@/': path.join(__dirname, 'src/'),
29+
"@": path.join(__dirname, "src"),
3030
},
3131
},
3232
},

0 commit comments

Comments
 (0)