diff --git a/webpack.main.ts b/webpack.main.ts index a7ea0096df..84c6912bca 100755 --- a/webpack.main.ts +++ b/webpack.main.ts @@ -13,7 +13,13 @@ export default function (): webpack.Configuration { target: "electron-main", mode: isProduction ? "production" : "development", devtool: isProduction ? "source-map" : "eval-source-map", - cache: isDevelopment, + cache: isDevelopment ? { + type: "filesystem", + buildDependencies: { + // Add your config as buildDependency to get cache invalidation on config change + config: [__filename] + } + }: false, entry: { main: path.resolve(mainDir, "index.ts"), }, diff --git a/webpack.renderer.ts b/webpack.renderer.ts index b431ab44fb..981a996613 100755 --- a/webpack.renderer.ts +++ b/webpack.renderer.ts @@ -32,7 +32,13 @@ export function webpackLensRenderer({ showVars = true } = {}): webpack.Configura }, name: "lens-app", mode: isProduction ? "production" : "development", - cache: isDevelopment, + cache: isDevelopment ? { + type: "filesystem", + buildDependencies: { + // Add your config as buildDependency to get cache invalidation on config change + config: [__filename] + } + } : false, entry: { [appName]: path.resolve(rendererDir, "bootstrap.tsx"), },