@rspack/core 0.5.7 → 0.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Compilation.d.ts +1 -2
- package/dist/Compiler.d.ts +7 -6
- package/dist/Compiler.js +101 -164
- package/dist/NormalModuleFactory.d.ts +2 -1
- package/dist/NormalModuleFactory.js +25 -1
- package/dist/Watching.js +2 -2
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +11 -0
- package/dist/builtin-plugin/JsLoaderRspackPlugin.js +7 -0
- package/dist/builtin-plugin/index.d.ts +1 -0
- package/dist/builtin-plugin/index.js +1 -0
- package/dist/config/adapter.js +9 -8
- package/dist/config/zod.d.ts +324 -70
- package/dist/config/zod.js +8 -1
- package/dist/exports.d.ts +16 -4
- package/dist/lite-tapable/index.d.ts +14 -1
- package/dist/lite-tapable/index.js +168 -1
- package/dist/loader-runner/index.d.ts +2 -2
- package/dist/loader-runner/index.js +4 -4
- package/dist/rspackOptionsApply.js +1 -0
- package/package.json +5 -5
package/dist/config/adapter.js
CHANGED
|
@@ -480,7 +480,7 @@ function getRawAssetGeneratorOptions(options) {
|
|
|
480
480
|
function getRawAssetInlineGeneratorOptions(options) {
|
|
481
481
|
return {
|
|
482
482
|
dataUrl: options.dataUrl
|
|
483
|
-
?
|
|
483
|
+
? getRawAssetGeneratorDataUrl(options.dataUrl)
|
|
484
484
|
: undefined
|
|
485
485
|
};
|
|
486
486
|
}
|
|
@@ -490,17 +490,18 @@ function getRawAssetResourceGeneratorOptions(options) {
|
|
|
490
490
|
publicPath: options.publicPath
|
|
491
491
|
};
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function getRawAssetGeneratorDataUrl(dataUrl) {
|
|
494
494
|
if (typeof dataUrl === "object" && dataUrl !== null) {
|
|
495
|
+
const encoding = dataUrl.encoding === false ? "false" : dataUrl.encoding;
|
|
495
496
|
return {
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
encoding: dataUrl.encoding === false ? "false" : dataUrl.encoding,
|
|
499
|
-
mimetype: dataUrl.mimetype
|
|
500
|
-
}
|
|
497
|
+
encoding,
|
|
498
|
+
mimetype: dataUrl.mimetype
|
|
501
499
|
};
|
|
502
500
|
}
|
|
503
|
-
|
|
501
|
+
if (typeof dataUrl === "function" && dataUrl !== null) {
|
|
502
|
+
return dataUrl;
|
|
503
|
+
}
|
|
504
|
+
throw new Error(`unreachable: AssetGeneratorDataUrl type should be one of "options", "function", but got ${dataUrl}`);
|
|
504
505
|
}
|
|
505
506
|
function getRawOptimization(optimization) {
|
|
506
507
|
(0, assert_1.default)(!(0, util_1.isNil)(optimization.removeAvailableModules) &&
|