diff options
author | Kristóf Marussy <kristof@marussy.com> | 2021-12-30 12:07:19 +0100 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2021-12-30 12:38:24 +0100 |
commit | e46099ac744919c927909f741d9b5870abab5a58 (patch) | |
tree | 393985ecf730f0908db1eefaaedb6fb92c726e40 /packages/main | |
parent | build: Use shared packages through modules (diff) | |
download | sophie-e46099ac744919c927909f741d9b5870abab5a58.tar.gz sophie-e46099ac744919c927909f741d9b5870abab5a58.tar.zst sophie-e46099ac744919c927909f741d9b5870abab5a58.zip |
build: Only use vite typings in renderer
The rest of the packages aren't buld with vite, so we shouldn't use its
typings.
Diffstat (limited to 'packages/main')
-rw-r--r-- | packages/main/tsconfig.json | 3 | ||||
-rw-r--r-- | packages/main/types/importMeta.d.ts | 8 | ||||
-rw-r--r-- | packages/main/types/vite-env.d.ts | 5 |
3 files changed, 9 insertions, 7 deletions
diff --git a/packages/main/tsconfig.json b/packages/main/tsconfig.json index 6387562..10f5765 100644 --- a/packages/main/tsconfig.json +++ b/packages/main/tsconfig.json | |||
@@ -3,8 +3,7 @@ | |||
3 | "compilerOptions": { | 3 | "compilerOptions": { |
4 | "noEmit": true, | 4 | "noEmit": true, |
5 | "types": [ | 5 | "types": [ |
6 | "node", | 6 | "node" |
7 | "vite/client" | ||
8 | ] | 7 | ] |
9 | }, | 8 | }, |
10 | "references": [ | 9 | "references": [ |
diff --git a/packages/main/types/importMeta.d.ts b/packages/main/types/importMeta.d.ts new file mode 100644 index 0000000..3da01d3 --- /dev/null +++ b/packages/main/types/importMeta.d.ts | |||
@@ -0,0 +1,8 @@ | |||
1 | interface ImportMeta { | ||
2 | env: { | ||
3 | DEV: boolean; | ||
4 | MODE: string; | ||
5 | PROD: boolean; | ||
6 | VITE_DEV_SERVER_URL: string; | ||
7 | } | ||
8 | } | ||
diff --git a/packages/main/types/vite-env.d.ts b/packages/main/types/vite-env.d.ts deleted file mode 100644 index c6d56a6..0000000 --- a/packages/main/types/vite-env.d.ts +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | /// <reference types="vite/client" /> | ||
2 | |||
3 | interface ImportMetaEnv { | ||
4 | VITE_DEV_SERVER_URL: string | undefined; | ||
5 | } | ||