diff --git a/electron/electron-env.d.ts b/electron/electron-env.d.ts new file mode 100644 index 0000000..b0ec4b6 --- /dev/null +++ b/electron/electron-env.d.ts @@ -0,0 +1,24 @@ +/// + +declare namespace NodeJS { + interface ProcessEnv { + /** + * The built directory structure + * + * ```tree + * ├─┬ dist + * │ ├─┬ electron + * │ │ ├─┬ main + * │ │ │ └── index.js + * │ │ └─┬ preload + * │ │ └── index.js + * │ ├── index.html + * │ ├── ...other-static-files-from-public + * │ + * ``` + */ + DIST: string + /** /dist/ or /public/ */ + PUBLIC: string + } +} diff --git a/tsconfig.node.json b/tsconfig.node.json index 767a0b1..9e6f062 100644 --- a/tsconfig.node.json +++ b/tsconfig.node.json @@ -6,10 +6,7 @@ "moduleResolution": "Node", "jsx": "preserve", "resolveJsonModule": true, - "allowSyntheticDefaultImports": true, - "types": [ - "vite-plugin-electron/electron-env" - ] + "allowSyntheticDefaultImports": true }, "include": ["package.json", "electron"] }