Skip to content

Commit 58891e8

Browse files
author
Kai Eichinger
authored
Remove chunk splitting (#101)
Remove chunk splitting
2 parents 1508376 + 2ff2a34 commit 58891e8

File tree

6 files changed

+12
-45
lines changed

6 files changed

+12
-45
lines changed

.github/pull_request_template.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
| Q | A
2-
| ------------- | ---
3-
| Bug fix? | yes/no
4-
| Improvement? | yes/no <!-- improves an existing feature, not adding a new one -->
5-
| New feature? | yes/no <!-- don't forget to update CHANGELOG.md -->
6-
| BC breaks? | no
7-
| Deprecations? | yes/no <!-- don't forget to update UPGRADE.md and CHANGELOG.md -->
8-
| Docs PR | **missing** <!-- insert URL here -->
2+
| ------------- | --------------------------------------------------------------------- |
3+
| BC breaks? | yes/no |
4+
| New feature? | yes/no <!-- don't forget to update CHANGELOG.md --> |
5+
| Improvement? | yes/no <!-- improves an existing feature, not adding a new one --> |
6+
| Bug fix? | yes/no |
7+
| Deprecations? | yes/no <!-- don't forget to update UPGRADE.md and CHANGELOG.md --> |
8+
| Docs PR | **missing** <!-- insert URL here --> |
99

1010
<!-- describe your changes below -->

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

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"test": "npm run-script build && ava"
2020
},
2121
"optionalDependencies": {
22-
"kaba-scss": "^3.1.0",
22+
"kaba-scss": "^3.3.2",
2323
"webpack-bundle-analyzer": "^3.6.0"
2424
},
2525
"dependencies": {
@@ -50,7 +50,7 @@
5050
"devDependencies": {
5151
"@types/terser-webpack-plugin": "^2.2.0",
5252
"ava": "^2.4.0",
53-
"kaba-scss": "^3.1.0",
53+
"kaba-scss": "^3.3.2",
5454
"webpack-bundle-analyzer": "^3.6.0"
5555
},
5656
"engines": {

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({

src/runner/SassRunner.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class SassRunner
2424
*
2525
* @return {Promise<boolean>} whether the build was successful and error-free
2626
*/
27-
public async run () : Promise<boolean|null>
27+
public async run () : Promise<boolean|void>
2828
{
2929
const entries = Object.keys(this.buildConfig.entries);
3030

0 commit comments

Comments
 (0)