From 84217d37a9f6c1c2888fccf373cb2698b94d2a14 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Tue, 29 Mar 2022 10:01:28 -0400 Subject: [PATCH] remove ignoreIf from webpack/vars.ts Signed-off-by: Sebastian Malton --- webpack/renderer.ts | 10 ++++++---- webpack/vars.ts | 6 ------ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/webpack/renderer.ts b/webpack/renderer.ts index 126a0e25cfc2..da8f28577929 100755 --- a/webpack/renderer.ts +++ b/webpack/renderer.ts @@ -13,7 +13,7 @@ import CircularDependencyPlugin from "circular-dependency-plugin"; import ReactRefreshWebpackPlugin from "@pmmmwh/react-refresh-webpack-plugin"; import type { WebpackPluginInstance } from "webpack"; import getTypescriptLoader from "./get-typescript-loader"; -import { assetsFolderName, isDevelopment, rendererDir, buildDir, appName, htmlTemplate, publicPath, sassCommonVars, ignoreIf } from "./vars"; +import { assetsFolderName, isDevelopment, rendererDir, buildDir, appName, htmlTemplate, publicPath, sassCommonVars } from "./vars"; export function webpackLensRenderer({ showVars = true } = {}): webpack.Configuration { if (showVars) { @@ -115,9 +115,11 @@ export function webpackLensRenderer({ showVars = true } = {}): webpack.Configura filename: "[name].css", }), - ...ignoreIf(isDevelopment, [ - new ReactRefreshWebpackPlugin(), - ]), + ...( + isDevelopment + ? [] + : [new ReactRefreshWebpackPlugin()] + ), ], }; } diff --git a/webpack/vars.ts b/webpack/vars.ts index d4737fd9ef0b..478b04459d16 100644 --- a/webpack/vars.ts +++ b/webpack/vars.ts @@ -19,9 +19,3 @@ export const appName = isDevelopment export const htmlTemplate = path.resolve(rendererDir, "template.html"); export const publicPath = "/build/"; export const sassCommonVars = path.resolve(rendererDir, "components/vars.scss"); - -export function ignoreIf(check: boolean, src: T[]): T[] { - return check - ? [] - : src; -}