Commit 7b59959 1 parent 1b2bf1b commit 7b59959 Copy full SHA for 7b59959
File tree 3 files changed +33
-8
lines changed
3 files changed +33
-8
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * The electron-vite plugin exposes environment variables from .env file
3
+ * to the main, preload, and renderer processes based on prefixes.
4
+ * The default prefixes are `MAIN_VITE_`, `RENDERER_VITE_`, and `PRELOAD_VITE_`.
5
+ *
6
+ * You access the variables in code via `import.meta.env.{key}`.
7
+ * For typescript support, define the keys in this interface.
8
+ *
9
+ * https://electron-vite.org/guide/env-and-mode.html
10
+ */
11
+ interface ImportMetaEnv {
12
+ readonly MAIN_VITE_SENTRY_DSN : string ;
13
+ readonly MAIN_VITE_SENTRY_CRASH_REPORT_DSN : string ;
14
+ }
15
+
16
+ interface ImportMeta {
17
+ readonly env : ImportMetaEnv ;
18
+ }
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Utilities to check what platform the electron app is running on.
3
+ */
4
+
5
+ export function isWindows ( ) : boolean {
6
+ return process . platform === 'win32' ;
7
+ }
8
+
9
+ export function isMacOS ( ) : boolean {
10
+ return process . platform === 'darwin' ;
11
+ }
12
+
13
+ export function isLinux ( ) : boolean {
14
+ return process . platform === 'linux' ;
15
+ }
Original file line number Diff line number Diff line change 11
11
* https://electron-vite.org/guide/env-and-mode.html
12
12
*/
13
13
interface ImportMetaEnv {
14
- /**
15
- * MAIN
16
- */
17
- readonly MAIN_VITE_SENTRY_DSN : string ;
18
- readonly MAIN_VITE_SENTRY_CRASH_REPORT_DSN : string ;
19
- /**
20
- * RENDERER
21
- */
22
14
readonly RENDERER_VITE_SENTRY_DSN : string ;
23
15
readonly RENDERER_VITE_SENTRY_CRASH_REPORT_DSN : string ;
24
16
}
You can’t perform that action at this time.
0 commit comments