Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,25 +126,13 @@
"typescript": "6.0.3",
"vite": "8.0.14",
"vite-plugin-checker": "0.14.1",
"vite-plugin-electron": "0.29.1",
"vite-plugin-electron-renderer": "1.0.0",
"vite-plugin-electron": "1.0.0",
"vite-plus": "0.1.23",
"vitest": "4.1.7",
"zustand": "5.0.14"
},
"engines": {
"node": ">=24"
},
"packageManager": "pnpm@11.5.0",
"pnpm": {
"onlyBuiltDependencies": [
"@parcel/watcher",
"@swc/core",
"@tailwindcss/oxide",
"electron",
"electron-winstaller",
"esbuild",
"unrs-resolver"
]
}
"packageManager": "pnpm@11.5.0"
}
107 changes: 82 additions & 25 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
allowBuilds:
'@parcel/watcher': true
'@primer/primitives': false
'@swc/core': true
'@tailwindcss/oxide': true
electron: true
electron-winstaller: true
esbuild: true
unrs-resolver: true
overrides:
react-is: '19.2.6'
# Temporary workaround for electron/electron#51619.
# Electron installs can miss `path.txt` on Node 24.16+ until the upstream
# yauzl fix is picked up. Remove this once Electron ships a proper fix.
yauzl: '3.3.1'
# Force patched versions of transitive dev-tooling deps pulled in by
# react-devtools (old electron/got/cross-spawn) so they don't trip security
# scanners. None of these ship in the packaged app.
Expand Down
12 changes: 10 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,21 @@ export default defineConfig({
electron({
main: {
entry: fileURLToPath(new URL('src/main/index.ts', import.meta.url)),
onstart: async ({ startup }) => {
// vite-plugin-electron v1 starts Electron with `cwd: server.config.root`.
// Our Vite root is `src/renderer`, so we must override `cwd` back to the
// repository root or Electron will try to boot from `src/renderer`.
await startup(undefined, {
cwd: fileURLToPath(new URL('.', import.meta.url)),
});
},
vite: {
// The outer Vite config sets root:'src/renderer', so we must
// explicitly tell the main-process sub-build where to find .env files.
envDir: fileURLToPath(new URL('.', import.meta.url)),
build: {
outDir: fileURLToPath(new URL('build', import.meta.url)),
rollupOptions: {
rolldownOptions: {
output: { entryFileNames: 'main.js' },
external: [
'electron',
Expand All @@ -146,7 +154,7 @@ export default defineConfig({
vite: {
build: {
outDir: fileURLToPath(new URL('build', import.meta.url)),
rollupOptions: { output: { entryFileNames: 'preload.js' } },
rolldownOptions: { output: { entryFileNames: 'preload.js' } },
},
resolve: { conditions: ['node'] },
},
Expand Down
Loading