From f15b5c7a0bb0ff164cfdba87c14c6851a116c94c Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Thu, 18 Feb 2021 09:20:27 -0800 Subject: [PATCH] fix(template/typescript-webpack): magic constant is a string w/comments about what it's for (#2166) --- packages/template/typescript-webpack/tmpl/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/template/typescript-webpack/tmpl/index.ts b/packages/template/typescript-webpack/tmpl/index.ts index 2f35aaee86..5e679277fe 100644 --- a/packages/template/typescript-webpack/tmpl/index.ts +++ b/packages/template/typescript-webpack/tmpl/index.ts @@ -1,5 +1,8 @@ import { app, BrowserWindow } from 'electron'; -declare const MAIN_WINDOW_WEBPACK_ENTRY: any; +// This allows TypeScript to pick up the magic constant that's auto-generated by Forge's Webpack +// plugin that tells the Electron app where to look for the Webpack-bundled app code (depending on +// whether you're running in development or production). +declare const MAIN_WINDOW_WEBPACK_ENTRY: string; // Handle creating/removing shortcuts on Windows when installing/uninstalling. if (require('electron-squirrel-startup')) { // eslint-disable-line global-require