You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/rspack-test-tools/tests/__snapshots__/Config.test.js.snap
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -209,6 +209,8 @@ Object {
209
209
}
210
210
`;
211
211
212
+
exports[`config config/builtins/enable-chunk-loading step should pass 1`] = `Chunk loading type "non-existing" is not enabled. EnableChunkLoadingPlugin need to be used to enable this type of chunk loading. This usually happens through the "output.enabledChunkLoadingTypes" option. If you are using a function as entry which sets "chunkLoading", you need to add all potential chunk loading types to "output.enabledChunkLoadingTypes". These types are enabled: custom, import, async-node`;
213
+
212
214
exports[`config config/chunk-index/available-modules-order-index exported tests should compile 1`] = `
Copy file name to clipboardExpand all lines: packages/rspack-test-tools/tests/__snapshots__/NewCodeSplitting-config.test.js.snap
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -209,6 +209,8 @@ Object {
209
209
}
210
210
`;
211
211
212
+
exports[`new-code-splitting config cases new-code-splitting config cases/builtins/enable-chunk-loading step should pass 1`] = `Chunk loading type "non-existing" is not enabled. EnableChunkLoadingPlugin need to be used to enable this type of chunk loading. This usually happens through the "output.enabledChunkLoadingTypes" option. If you are using a function as entry which sets "chunkLoading", you need to add all potential chunk loading types to "output.enabledChunkLoadingTypes". These types are enabled: custom, import, async-node`;
"EnableChunkLoadingPlugin need to be used to enable this type of chunk loading.",
43
+
'This usually happens through the "output.enabledChunkLoadingTypes" option.',
44
+
'If you are using a function as entry which sets "chunkLoading", you need to add all potential chunk loading types to "output.enabledChunkLoadingTypes".',
45
+
`These types are enabled: ${Array.from(
46
+
getEnabledTypes(compiler)
47
+
).join(", ")}`
48
+
].join(" ")
49
+
);
50
+
}
51
+
}
52
+
53
+
overrideapply(compiler: Compiler): void{
54
+
const[type]=this._args;
55
+
// Only enable once
56
+
constenabled=getEnabledTypes(compiler);
57
+
if(enabled.has(type))return;
58
+
enabled.add(type);
59
+
60
+
switch(type){
61
+
// builtin chunk loading types
62
+
case"jsonp":
63
+
case"import-scripts":
64
+
case"require":
65
+
case"async-node":
66
+
case"import": {
67
+
super.apply(compiler);
68
+
return;
69
+
}
70
+
default:
71
+
thrownewError(`Unsupported chunk loading type ${type}.
72
+
Plugins which provide custom chunk loading types must call EnableChunkLoadingPlugin.setEnabled(compiler, type) to disable this error.`);
0 commit comments