From 4850fe9eae39d697c92dbddf52912c1bc2cf7dc0 Mon Sep 17 00:00:00 2001 From: Hatton Date: Sat, 11 Mar 2023 10:15:38 -0700 Subject: [PATCH] Use ts-loader instead of babel in renderer --- .electron-react/webpack.renderer.config.js | 11 +++++------ src/main/index.ts | 11 ----------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/.electron-react/webpack.renderer.config.js b/.electron-react/webpack.renderer.config.js index c13decd..8f95488 100644 --- a/.electron-react/webpack.renderer.config.js +++ b/.electron-react/webpack.renderer.config.js @@ -68,12 +68,11 @@ let rendererConfig = { include: [rendererPath], }, { - test: /\.(js|jsx|ts|tsx)$/, - use: { - loader: "babel-loader", - options: { - cacheDirectory: true, - }, + test: /\.(js|ts|tsx)$/, + loader: "ts-loader", + options: { + transpileOnly: true, + experimentalWatchApi: true, }, exclude: /node_modules/, }, diff --git a/src/main/index.ts b/src/main/index.ts index 57481a5..b9e140a 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -59,17 +59,6 @@ function createWindow() { mainWindow.loadURL(winURL); - // if (process.env.NODE_ENV === "development") { - // console.log( - // "*****If you hang when doing a 'yarn dev', it's possible that Chrome is trying to pause on a breakpoint. Disable the mainWindow.openDevTools(), run 'dev' again, open devtools (ctrl+alt+i), turn off the breakpoint settings, then renable." - // ); - - // mainWindow.webContents.openDevTools(); - // } else if (process.env.DEBUG_BLOOMPUB_VIEWER === "yes") { - // // Sometimes it's useful to poke around to see what the production build is doing. - // mainWindow.webContents.openDevTools(); - // } - /* This is still in progress, held up while we decide if we can put the necessary certificate in github secrets. Without that, we can't sign, and without signing, we can' auto update anyways. setupAutoUpdate();*/