Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastaegert committed Nov 5, 2022
1 parent 383dbc9 commit 29ae273
Show file tree
Hide file tree
Showing 12 changed files with 6 additions and 11 deletions.
3 changes: 3 additions & 0 deletions src/utils/chunkAssignment.ts
Expand Up @@ -2,6 +2,7 @@ import ExternalModule from '../ExternalModule';
import Module from '../Module';
import { getOrCreate } from './getOrCreate';
import relativeId from './relativeId';
import { timeEnd, timeStart } from './timers';

type DependentModuleMap = Map<Module, Set<Module>>;
type ChunkDefinitions = { alias: string | null; modules: Module[] }[];
Expand Down Expand Up @@ -203,6 +204,7 @@ function getOptimizedChunks(
chunkModulesBySignature: { [chunkSignature: string]: Module[] },
minChunkSize: number
) {
timeStart('optimize chunks', 3);
const { chunksToBeMerged, unmergeableChunks } = getMergeableChunks(
chunkModulesBySignature,
minChunkSize
Expand Down Expand Up @@ -240,6 +242,7 @@ function getOptimizedChunks(
unmergeableChunks.push(sourceChunk);
}
}
timeEnd('optimize chunks', 3);
return unmergeableChunks;
}

Expand Down
@@ -1,5 +1,4 @@
module.exports = {
solo: true,
description: 'uses the merge target that is closest',
options: {
input: [
Expand Down
@@ -1,5 +1,4 @@
module.exports = {
solo: true,
description:
'merges small chunks into shared chunks that are loaded by a non-close super-set of entry points',
options: {
Expand Down
@@ -1,5 +1,4 @@
module.exports = {
solo: true,
description:
'merges small chunks into shared chunks that are loaded by a super-set of entry points',
options: {
Expand Down
@@ -1,5 +1,4 @@
module.exports = {
solo: true,
description: 'merges small chunks into other small chunks first before merging into a big chunk',
options: {
input: ['main1.js', 'main2.js', 'main3.js', 'main4.js', 'main5.js'],
Expand Down
@@ -1,5 +1,4 @@
module.exports = {
solo: true,
description: 'merges small chunks into other small chunks first before merging into a big chunk',
options: {
input: ['main1.js', 'main2.js', 'main3.js', 'main4.js', 'main5.js'],
Expand Down
@@ -1,5 +1,4 @@
module.exports = {
solo: true,
description: 'merges small chunks into other small chunks first before merging into a big chunk',
options: {
input: ['main1.js', 'main2.js', 'main3.js', 'main4.js'],
Expand Down
@@ -1,5 +1,4 @@
module.exports = {
solo: true,
description: 'merges small chunks into other small chunks first before merging into a big chunk',
options: {
input: ['main1.js', 'main2.js', 'main3.js', 'main4.js'],
Expand Down
@@ -1,5 +1,4 @@
module.exports = {
solo: true,
description: 'merges unrelated small chunks if there is no better alternative',
options: {
input: ['main1.js', 'main2.js', 'main3.js'],
Expand Down
@@ -1,5 +1,4 @@
module.exports = {
solo: true,
description: 'does not merge small chunks that have side effects',
options: {
input: ['main1.js', 'main2.js', 'main3.js'],
Expand Down
1 change: 1 addition & 0 deletions test/function/samples/output-options-hook/_config.js
Expand Up @@ -27,6 +27,7 @@ module.exports = {
dynamicImportInCjs: true,
entryFileNames: '[name].js',
esModule: 'if-default-prop',
experimentalMinChunkSize: 0,
exports: 'auto',
extend: false,
externalImportAssertions: true,
Expand Down
4 changes: 2 additions & 2 deletions test/misc/optionList.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 29ae273

Please sign in to comment.