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:
parent
c7cf786380
commit
6aec421dc0
@ -13,7 +13,13 @@ export default function (): webpack.Configuration {
|
|||||||
target: "electron-main",
|
target: "electron-main",
|
||||||
mode: isProduction ? "production" : "development",
|
mode: isProduction ? "production" : "development",
|
||||||
devtool: isProduction ? "source-map" : "eval-source-map",
|
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: {
|
entry: {
|
||||||
main: path.resolve(mainDir, "index.ts"),
|
main: path.resolve(mainDir, "index.ts"),
|
||||||
},
|
},
|
||||||
|
|||||||
@ -32,7 +32,13 @@ export function webpackLensRenderer({ showVars = true } = {}): webpack.Configura
|
|||||||
},
|
},
|
||||||
name: "lens-app",
|
name: "lens-app",
|
||||||
mode: isProduction ? "production" : "development",
|
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: {
|
entry: {
|
||||||
[appName]: path.resolve(rendererDir, "bootstrap.tsx"),
|
[appName]: path.resolve(rendererDir, "bootstrap.tsx"),
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user