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:
parent
ba6acfb20a
commit
4e02f943f3
@ -1,7 +1,7 @@
|
|||||||
import path from "path";
|
import path from "path";
|
||||||
import webpack from "webpack";
|
import webpack from "webpack";
|
||||||
import ForkTsCheckerPlugin from "fork-ts-checker-webpack-plugin";
|
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 nodeExternals from "webpack-node-externals";
|
||||||
import * as vars from "./src/common/vars";
|
import * as vars from "./src/common/vars";
|
||||||
|
|
||||||
@ -39,10 +39,12 @@ export default function (): webpack.Configuration {
|
|||||||
// (for faster re-compiling)
|
// (for faster re-compiling)
|
||||||
// https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366
|
// https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366
|
||||||
splitChunks: isDevelopment ? {
|
splitChunks: isDevelopment ? {
|
||||||
|
// chunks can be shared even between async and non-async chunks
|
||||||
chunks: "all",
|
chunks: "all",
|
||||||
|
name: `${appName}.main.chucks.js`
|
||||||
} : false,
|
} : false,
|
||||||
runtimeChunk: isDevelopment ? {
|
runtimeChunk: isDevelopment ? {
|
||||||
name: (entrypoint: { name: string }) => `runtime-${entrypoint.name}`,
|
name: `${appName}.main.chucks.runtime.js`,
|
||||||
} : false,
|
} : false,
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
|
|||||||
@ -47,7 +47,6 @@ export function webpackLensRenderer({ showVars = true } = {}): webpack.Configura
|
|||||||
publicPath,
|
publicPath,
|
||||||
path: buildDir,
|
path: buildDir,
|
||||||
filename: "[name].js",
|
filename: "[name].js",
|
||||||
chunkFilename: "chunks/[name].js",
|
|
||||||
},
|
},
|
||||||
ignoreWarnings: [
|
ignoreWarnings: [
|
||||||
/Critical dependency: the request of a dependency is an expression/,
|
/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
|
// Automatically split vendor and commons in development
|
||||||
// (for faster re-compiling)
|
// (for faster re-compiling)
|
||||||
// https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366
|
// https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366
|
||||||
|
// @ts-ignore
|
||||||
splitChunks: isDevelopment ? {
|
splitChunks: isDevelopment ? {
|
||||||
|
// chunks can be shared even between async and non-async chunks
|
||||||
chunks: "all",
|
chunks: "all",
|
||||||
|
name: `${appName}.renderer.chucks.js`
|
||||||
}: false,
|
}: false,
|
||||||
runtimeChunk: isDevelopment ? {
|
runtimeChunk: isDevelopment ? {
|
||||||
name: (entrypoint: { name: string }) => `runtime-${entrypoint.name}`,
|
name: `${appName}.renderer.chucks.runtime.js`,
|
||||||
}: false,
|
}: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user