1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Enable persistent cache in renderer/main

Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
This commit is contained in:
Hung-Han (Henry) Chen 2020-12-04 17:36:56 +08:00
parent c7cf786380
commit 6aec421dc0
No known key found for this signature in database
GPG Key ID: A28B7834EFA73792
2 changed files with 14 additions and 2 deletions

View File

@ -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"),
},

View File

@ -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"),
},