From 68a0d1da3a91d697ecf0888447744d507d52000c Mon Sep 17 00:00:00 2001 From: Bauke Date: Thu, 30 Dec 2021 23:48:29 +0100 Subject: [PATCH] Fix Vite not inserting defined constants in production. --- source/ts/components/shared-footer.ts | 2 +- source/ts/types.d.ts | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/source/ts/components/shared-footer.ts b/source/ts/components/shared-footer.ts index 5f4e7e2..e2b7c19 100644 --- a/source/ts/components/shared-footer.ts +++ b/source/ts/components/shared-footer.ts @@ -7,7 +7,7 @@ export default class SharedFooter extends Component { return html` `; } diff --git a/source/ts/types.d.ts b/source/ts/types.d.ts index 34da1f7..f2691c8 100644 --- a/source/ts/types.d.ts +++ b/source/ts/types.d.ts @@ -2,9 +2,7 @@ export {}; declare global { - interface Window { - // These are created in `vite.config.ts` and defined by Vite at build time. - blinkCommitHash: string; - blinkVersion: string; - } + // These are created in `vite.config.ts` and inserted by Vite at build time. + const blinkCommitHash: string; + const blinkVersion: string; }