Skip to content

Commit

Permalink
progress
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattMufson committed Jan 22, 2025
1 parent d294409 commit c4899f7
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
2 changes: 2 additions & 0 deletions examples/connect-electron/electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ mac:
forceCodeSigning: false
gatekeeperAssess: false
hardenedRuntime: true
type: distribution
extendInfo:
- NSCameraUsageDescription: Application requests access to the device's camera.
- NSMicrophoneUsageDescription: Application requests access to the device's microphone.
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder.
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
notarize: false
dmg:
sign: false
artifactName: "${productName}-${version}.${ext}"
linux:
target:
Expand Down
15 changes: 13 additions & 2 deletions examples/connect-electron/electron.vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@ import { nodeResolve } from "@rollup/plugin-node-resolve";
import react from "@vitejs/plugin-react";
import { defineConfig, externalizeDepsPlugin } from "electron-vite";

const externalizedDependenciesExcludeList = ["electron-app-package-json"];

export default defineConfig({
main: {
plugins: [externalizeDepsPlugin(), nodeResolve()],
plugins: [
externalizeDepsPlugin({
exclude: externalizedDependenciesExcludeList,
}),
nodeResolve(),
],
optimizeDeps: {
force: true, // TODO: vite cache is not working with monorepo deps updates
},
Expand All @@ -19,7 +26,11 @@ export default defineConfig({
},
},
preload: {
plugins: [externalizeDepsPlugin()],
plugins: [
externalizeDepsPlugin({
exclude: externalizedDependenciesExcludeList,
}),
],
optimizeDeps: {
force: true, // TODO: vite cache is not working with monorepo deps updates
},
Expand Down
1 change: 1 addition & 0 deletions examples/connect-electron/out/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"express": "catalog:",
"@electron-toolkit/preload": "catalog:",
"@electron-toolkit/utils": "catalog:",
"@treasure-dev/launcher": "workspace:*",
"thirdweb": "catalog:"
}
}
5 changes: 4 additions & 1 deletion examples/connect-electron/tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"include": ["electron.vite.config.*", "src/main/**/*", "src/preload/**/*"],
"compilerOptions": {
"composite": true,
"types": ["electron-vite/node"]
"types": ["electron-vite/node"],
"paths": {
"@electron-app-package-json": ["./out/app/package.json"]
}
}
}
3 changes: 2 additions & 1 deletion examples/connect-electron/tsconfig.web.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"jsx": "react-jsx",
"baseUrl": ".",
"paths": {
"@renderer/*": ["src/renderer/src/*"]
"@renderer/*": ["src/renderer/src/*"],
"@electron-app-package-json": ["./out/app/package.json"]
}
}
}

0 comments on commit c4899f7

Please sign in to comment.