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

Correction of chuck name

Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
This commit is contained in:
Hung-Han (Henry) Chen 2020-12-14 18:37:23 +08:00
parent ba6acfb20a
commit 4e02f943f3
No known key found for this signature in database
GPG Key ID: A28B7834EFA73792
2 changed files with 8 additions and 4 deletions

View File

@ -1,7 +1,7 @@
import path from "path";
import webpack from "webpack";
import ForkTsCheckerPlugin from "fork-ts-checker-webpack-plugin";
import { isDevelopment, isProduction, mainDir, buildDir } from "./src/common/vars";
import { appName, isDevelopment, isProduction, mainDir, buildDir } from "./src/common/vars";
import nodeExternals from "webpack-node-externals";
import * as vars from "./src/common/vars";
@ -39,10 +39,12 @@ export default function (): webpack.Configuration {
// (for faster re-compiling)
// https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366
splitChunks: isDevelopment ? {
// chunks can be shared even between async and non-async chunks
chunks: "all",
name: `${appName}.main.chucks.js`
} : false,
runtimeChunk: isDevelopment ? {
name: (entrypoint: { name: string }) => `runtime-${entrypoint.name}`,
name: `${appName}.main.chucks.runtime.js`,
} : false,
},
module: {

View File

@ -47,7 +47,6 @@ export function webpackLensRenderer({ showVars = true } = {}): webpack.Configura
publicPath,
path: buildDir,
filename: "[name].js",
chunkFilename: "chunks/[name].js",
},
ignoreWarnings: [
/Critical dependency: the request of a dependency is an expression/,
@ -81,11 +80,14 @@ export function webpackLensRenderer({ showVars = true } = {}): webpack.Configura
// Automatically split vendor and commons in development
// (for faster re-compiling)
// https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366
// @ts-ignore
splitChunks: isDevelopment ? {
// chunks can be shared even between async and non-async chunks
chunks: "all",
name: `${appName}.renderer.chucks.js`
}: false,
runtimeChunk: isDevelopment ? {
name: (entrypoint: { name: string }) => `runtime-${entrypoint.name}`,
name: `${appName}.renderer.chucks.runtime.js`,
}: false,
},