Skip to content

Commit b439e8e

Browse files
author
Jannik Zschiesche
committed
Remove chunk splitting
1 parent 1508376 commit b439e8e

File tree

3 files changed

+2
-35
lines changed

3 files changed

+2
-35
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
* (improvement) Improved ESLint linting: now only files in the project dir are linted. This ensures that symlinked dev packages are
2828
not linted. (`/node_modules/` etc are still excluded, of course.)
2929
* (feature) Add option to polyfill core node packages in webpack.
30+
* (bc) Remove `disableChunkSplitting()`, chunk splitting is now always disabled. Use code splitting instead.
3031

3132

3233
8.1.0

UPGRADE.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Internal: The project was ported to TypeScript.
55
* Always build a legacy and a modern JS build.
66
* Removed the ability to use the project's `tsconfig.json`.
7+
* Removed `disableChunkSplitting()`, chunk splitting is now always disabled. Use code splitting instead and remove the call to this method.
78

89

910
7.x to 8.0

src/Kaba.ts

-35
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ export class Kaba
5050
private moduleConcatenationEnabled: boolean = false;
5151
private plugins: webpack.Plugin[] = [];
5252
private javaScriptDependenciesFileName: string = "_dependencies";
53-
private splitChunks: boolean = true;
5453
private hashFileNames: boolean = true;
5554
private buildModern: boolean = true;
5655
private nodeSettings: webpack.Node|false = false;
@@ -207,16 +206,6 @@ export class Kaba
207206
}
208207

209208

210-
/**
211-
* Disables chunk splitting
212-
*/
213-
public disableChunkSplitting (): this
214-
{
215-
this.splitChunks = false;
216-
return this;
217-
}
218-
219-
220209
/**
221210
* Disables chunk hashes in file names
222211
*/
@@ -388,30 +377,6 @@ export class Kaba
388377
node: this.nodeSettings,
389378
};
390379

391-
if (this.splitChunks)
392-
{
393-
(config.optimization as any).splitChunks = {
394-
chunks: "all",
395-
minChunks: 1,
396-
maxAsyncRequests: 5,
397-
maxInitialRequests: 3,
398-
name: true,
399-
cacheGroups: {
400-
default: {
401-
minChunks: 2,
402-
priority: -20,
403-
reuseExistingChunk: true,
404-
},
405-
vendors: {
406-
test: /[\\/]node_modules[\\/]/,
407-
priority: -10,
408-
},
409-
},
410-
};
411-
412-
(config.optimization as any).runtimeChunk = "single";
413-
}
414-
415380
if (!cliConfig.debug)
416381
{
417382
(config.optimization as any).minimizer.push(new TerserPlugin({

0 commit comments

Comments
 (0)