@rspack-canary/browser 1.6.6-canary-e2b38893-20251127173453 → 1.6.6-canary-ece652e9-20251129173621
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/config/types.d.ts
CHANGED
|
@@ -634,7 +634,18 @@ export type RuleSetLoaderOptions = string | Record<string, any>;
|
|
|
634
634
|
export type RuleSetLoaderWithOptions = {
|
|
635
635
|
ident?: string;
|
|
636
636
|
loader: RuleSetLoader;
|
|
637
|
-
|
|
637
|
+
/**
|
|
638
|
+
* Controls whether a given loader should run in worker threads for parallel execution. Loaders marked
|
|
639
|
+
* with `parallel` are scheduled across multiple threads, reducing pressure on the main thread and improving
|
|
640
|
+
* overall build performance.
|
|
641
|
+
* - When set to `true`, the loader runs in a worker. Rspack automatically selects an appropriate number of
|
|
642
|
+
* worker threads.
|
|
643
|
+
* - When set to `{ maxWorkers }`, you can explicitly define the maximum number of workers to use.
|
|
644
|
+
* - When set to `false` or omitted, the loader runs on the main thread.
|
|
645
|
+
*/
|
|
646
|
+
parallel?: boolean | {
|
|
647
|
+
maxWorkers?: number;
|
|
648
|
+
};
|
|
638
649
|
options?: RuleSetLoaderOptions;
|
|
639
650
|
};
|
|
640
651
|
export type RuleSetUseItem = RuleSetLoader | RuleSetLoaderWithOptions;
|
package/dist/index.mjs
CHANGED
|
@@ -55126,7 +55126,7 @@ async function runLoaders(compiler, context) {
|
|
|
55126
55126
|
loaderContext: getWorkerLoaderContext(),
|
|
55127
55127
|
loaderState,
|
|
55128
55128
|
args
|
|
55129
|
-
}, getWorkerLoaderHandlers()) || [];
|
|
55129
|
+
}, getWorkerLoaderHandlers(), "object" == typeof currentLoaderObject?.parallel ? currentLoaderObject.parallel : void 0) || [];
|
|
55130
55130
|
else {
|
|
55131
55131
|
if (loaderState === external_rspack_wasi_browser_js_.JsLoaderState.Normal) convertArgs(args, !!currentLoaderObject?.raw);
|
|
55132
55132
|
result = await utils_runSyncOrAsync(fn, loaderContext, args) || [];
|
|
@@ -58190,7 +58190,7 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
|
58190
58190
|
if ("object" == typeof rspackFuture) {
|
|
58191
58191
|
D(rspackFuture, "bundlerInfo", {});
|
|
58192
58192
|
if ("object" == typeof rspackFuture.bundlerInfo) {
|
|
58193
|
-
D(rspackFuture.bundlerInfo, "version", "1.6.6-canary-
|
|
58193
|
+
D(rspackFuture.bundlerInfo, "version", "1.6.6-canary-ece652e9-20251129173621");
|
|
58194
58194
|
D(rspackFuture.bundlerInfo, "bundler", "rspack");
|
|
58195
58195
|
D(rspackFuture.bundlerInfo, "force", !library);
|
|
58196
58196
|
}
|
|
@@ -62140,7 +62140,7 @@ class MultiStats {
|
|
|
62140
62140
|
return obj;
|
|
62141
62141
|
});
|
|
62142
62142
|
if (childOptions.version) {
|
|
62143
|
-
obj.rspackVersion = "1.6.6-canary-
|
|
62143
|
+
obj.rspackVersion = "1.6.6-canary-ece652e9-20251129173621";
|
|
62144
62144
|
obj.version = "5.75.0";
|
|
62145
62145
|
}
|
|
62146
62146
|
if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join("");
|
|
@@ -63445,7 +63445,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
63445
63445
|
},
|
|
63446
63446
|
version: (object)=>{
|
|
63447
63447
|
object.version = "5.75.0";
|
|
63448
|
-
object.rspackVersion = "1.6.6-canary-
|
|
63448
|
+
object.rspackVersion = "1.6.6-canary-ece652e9-20251129173621";
|
|
63449
63449
|
},
|
|
63450
63450
|
env: (object, _compilation, _context, { _env })=>{
|
|
63451
63451
|
object.env = _env;
|
|
@@ -66582,7 +66582,7 @@ function transformSync(source, options) {
|
|
|
66582
66582
|
const _options = JSON.stringify(options || {});
|
|
66583
66583
|
return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
|
|
66584
66584
|
}
|
|
66585
|
-
const exports_rspackVersion = "1.6.6-canary-
|
|
66585
|
+
const exports_rspackVersion = "1.6.6-canary-ece652e9-20251129173621";
|
|
66586
66586
|
const exports_version = "5.75.0";
|
|
66587
66587
|
const exports_WebpackError = Error;
|
|
66588
66588
|
const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
|
|
@@ -11,7 +11,9 @@ export declare class LoaderObject {
|
|
|
11
11
|
pitch?: Function;
|
|
12
12
|
raw?: boolean;
|
|
13
13
|
type?: "module" | "commonjs";
|
|
14
|
-
parallel?: boolean
|
|
14
|
+
parallel?: boolean | {
|
|
15
|
+
maxWorkers?: number;
|
|
16
|
+
};
|
|
15
17
|
/**
|
|
16
18
|
* @internal This field is rspack internal. Do not edit.
|
|
17
19
|
*/
|
|
@@ -67,5 +67,7 @@ export type WorkerError = Error;
|
|
|
67
67
|
export declare function serializeError(error: unknown): WorkerError;
|
|
68
68
|
export declare const run: (loaderName: string, task: any, options: RunOptions & {
|
|
69
69
|
handleIncomingRequest: HandleIncomingRequest;
|
|
70
|
+
}, workerOptions?: {
|
|
71
|
+
maxWorkers?: number;
|
|
70
72
|
}) => Promise<WorkerArgs>;
|
|
71
73
|
export {};
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack-canary/browser",
|
|
3
|
-
"version": "1.6.6-canary-
|
|
3
|
+
"version": "1.6.6-canary-ece652e9-20251129173621",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Rspack for running in the browser. This is still in early stage and may not follow the semver.",
|