@rspack/browser 1.6.4 → 1.6.6
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/builtin-plugin/RuntimePlugin.d.ts +1 -0
- package/dist/config/target.d.ts +2 -0
- package/dist/config/types.d.ts +23 -3
- package/dist/index.mjs +99 -34
- package/dist/loader-runner/index.d.ts +3 -1
- package/dist/loader-runner/service.d.ts +2 -0
- package/dist/napi-binding.d.ts +18 -8
- package/dist/rspack.wasm32-wasi.wasm +0 -0
- package/package.json +2 -2
|
@@ -14,6 +14,7 @@ export declare const RuntimePluginImpl: {
|
|
|
14
14
|
};
|
|
15
15
|
export type RuntimePluginHooks = {
|
|
16
16
|
createScript: liteTapable.SyncWaterfallHook<[string, Chunk]>;
|
|
17
|
+
createLink: liteTapable.SyncWaterfallHook<[string, Chunk]>;
|
|
17
18
|
linkPreload: liteTapable.SyncWaterfallHook<[string, Chunk]>;
|
|
18
19
|
linkPrefetch: liteTapable.SyncWaterfallHook<[string, Chunk]>;
|
|
19
20
|
};
|
package/dist/config/target.d.ts
CHANGED
|
@@ -50,6 +50,8 @@ export type EcmaTargetProperties = {
|
|
|
50
50
|
bigIntLiteral: boolean | null;
|
|
51
51
|
/** const and let variable declarations are available */
|
|
52
52
|
const: boolean | null;
|
|
53
|
+
/** method shorthand in object is available */
|
|
54
|
+
methodShorthand: boolean | null;
|
|
53
55
|
/** arrow functions are available */
|
|
54
56
|
arrowFunction: boolean | null;
|
|
55
57
|
/** for of iteration is available */
|
package/dist/config/types.d.ts
CHANGED
|
@@ -276,6 +276,8 @@ export type Environment = {
|
|
|
276
276
|
forOf?: boolean;
|
|
277
277
|
/** The environment supports 'globalThis'. */
|
|
278
278
|
globalThis?: boolean;
|
|
279
|
+
/** The environment supports { fn() {} } */
|
|
280
|
+
methodShorthand?: boolean;
|
|
279
281
|
/** The environment supports ECMAScript Module syntax to import ECMAScript modules (import ... from '...'). */
|
|
280
282
|
module?: boolean;
|
|
281
283
|
/**
|
|
@@ -295,8 +297,15 @@ export type Output = {
|
|
|
295
297
|
* */
|
|
296
298
|
path?: Path;
|
|
297
299
|
/**
|
|
298
|
-
*
|
|
299
|
-
*
|
|
300
|
+
* Controls whether Rspack adds module-related comments to the generated bundle.
|
|
301
|
+
* These comments are useful for debugging, inspecting build output, and understanding
|
|
302
|
+
* tree-shaking behavior.
|
|
303
|
+
* - `true`: Enables basic comments, including module path information.
|
|
304
|
+
* - `false`: Disables all comments, which is the default behavior.
|
|
305
|
+
* - `'verbose'`: Outputs detailed comments, such as module exports, runtime details,
|
|
306
|
+
* tree-shaking information, and bailout reasons. This mode is helpful when diagnosing
|
|
307
|
+
* build issues or performing in-depth bundle analysis.
|
|
308
|
+
* @default false
|
|
300
309
|
*/
|
|
301
310
|
pathinfo?: Pathinfo;
|
|
302
311
|
/**
|
|
@@ -625,7 +634,18 @@ export type RuleSetLoaderOptions = string | Record<string, any>;
|
|
|
625
634
|
export type RuleSetLoaderWithOptions = {
|
|
626
635
|
ident?: string;
|
|
627
636
|
loader: RuleSetLoader;
|
|
628
|
-
|
|
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
|
+
};
|
|
629
649
|
options?: RuleSetLoaderOptions;
|
|
630
650
|
};
|
|
631
651
|
export type RuleSetUseItem = RuleSetLoader | RuleSetLoaderWithOptions;
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! For license information please see index.mjs.LICENSE.txt */
|
|
2
|
-
import * as
|
|
2
|
+
import * as __rspack_external__rspack_wasi_browser_js_bd433424 from "./rspack.wasi-browser.js";
|
|
3
3
|
import { AsyncParallelHook, AsyncSeriesBailHook, AsyncSeriesHook, AsyncSeriesWaterfallHook, HookMap, MultiHook, SyncBailHook, SyncHook, SyncWaterfallHook, maxStage, minStage, safeStage } from "@rspack/lite-tapable";
|
|
4
4
|
var __webpack_modules__ = {
|
|
5
5
|
"../../node_modules/.pnpm/asn1.js@4.10.1/node_modules/asn1.js/lib/asn1.js": function(__unused_webpack_module, exports, __webpack_require__) {
|
|
@@ -2738,7 +2738,7 @@ var __webpack_modules__ = {
|
|
|
2738
2738
|
BN.wordSize = 26;
|
|
2739
2739
|
var Buffer;
|
|
2740
2740
|
try {
|
|
2741
|
-
Buffer = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : __webpack_require__("?
|
|
2741
|
+
Buffer = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : __webpack_require__("?4fc0").Buffer;
|
|
2742
2742
|
} catch (e) {}
|
|
2743
2743
|
BN.isBN = function(num) {
|
|
2744
2744
|
if (num instanceof BN) return true;
|
|
@@ -5228,7 +5228,7 @@ var __webpack_modules__ = {
|
|
|
5228
5228
|
BN.wordSize = 26;
|
|
5229
5229
|
var Buffer;
|
|
5230
5230
|
try {
|
|
5231
|
-
Buffer = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : __webpack_require__("?
|
|
5231
|
+
Buffer = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : __webpack_require__("?dcfb").Buffer;
|
|
5232
5232
|
} catch (e) {}
|
|
5233
5233
|
BN.isBN = function(num) {
|
|
5234
5234
|
if (num instanceof BN) return true;
|
|
@@ -7776,7 +7776,7 @@ var __webpack_modules__ = {
|
|
|
7776
7776
|
throw new Error('Not implemented yet');
|
|
7777
7777
|
};
|
|
7778
7778
|
} else try {
|
|
7779
|
-
var crypto = __webpack_require__("?
|
|
7779
|
+
var crypto = __webpack_require__("?69f8");
|
|
7780
7780
|
if ('function' != typeof crypto.randomBytes) throw new Error('Not supported');
|
|
7781
7781
|
Rand.prototype._rand = function(n) {
|
|
7782
7782
|
return crypto.randomBytes(n);
|
|
@@ -18975,7 +18975,7 @@ var __webpack_modules__ = {
|
|
|
18975
18975
|
}
|
|
18976
18976
|
return $replace.call(str, sepRegex, '$&_');
|
|
18977
18977
|
}
|
|
18978
|
-
var utilInspect = __webpack_require__("?
|
|
18978
|
+
var utilInspect = __webpack_require__("?f42a");
|
|
18979
18979
|
var inspectCustom = utilInspect.custom;
|
|
18980
18980
|
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
|
|
18981
18981
|
var quotes = {
|
|
@@ -24912,7 +24912,7 @@ var __webpack_modules__ = {
|
|
|
24912
24912
|
}
|
|
24913
24913
|
var util = Object.create(__webpack_require__("../../node_modules/.pnpm/core-util-is@1.0.3/node_modules/core-util-is/lib/util.js"));
|
|
24914
24914
|
util.inherits = __webpack_require__("../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js");
|
|
24915
|
-
var debugUtil = __webpack_require__("?
|
|
24915
|
+
var debugUtil = __webpack_require__("?b05f");
|
|
24916
24916
|
var debug = void 0;
|
|
24917
24917
|
debug = debugUtil && debugUtil.debuglog ? debugUtil.debuglog('stream') : function() {};
|
|
24918
24918
|
var BufferList = __webpack_require__("../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/internal/streams/BufferList.js");
|
|
@@ -26032,7 +26032,7 @@ var __webpack_modules__ = {
|
|
|
26032
26032
|
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
26033
26033
|
}
|
|
26034
26034
|
var Buffer = __webpack_require__("../../node_modules/.pnpm/safe-buffer@5.1.2/node_modules/safe-buffer/index.js").Buffer;
|
|
26035
|
-
var util = __webpack_require__("?
|
|
26035
|
+
var util = __webpack_require__("?5f4e");
|
|
26036
26036
|
function copyBuffer(src, target, offset) {
|
|
26037
26037
|
src.copy(target, offset);
|
|
26038
26038
|
}
|
|
@@ -26348,7 +26348,7 @@ var __webpack_modules__ = {
|
|
|
26348
26348
|
function _isUint8Array(obj) {
|
|
26349
26349
|
return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
|
|
26350
26350
|
}
|
|
26351
|
-
var debugUtil = __webpack_require__("?
|
|
26351
|
+
var debugUtil = __webpack_require__("?8beb");
|
|
26352
26352
|
var debug;
|
|
26353
26353
|
debug = debugUtil && debugUtil.debuglog ? debugUtil.debuglog('stream') : function() {};
|
|
26354
26354
|
var BufferList = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/buffer_list.js");
|
|
@@ -27725,7 +27725,7 @@ var __webpack_modules__ = {
|
|
|
27725
27725
|
return ("string" === hint ? String : Number)(input);
|
|
27726
27726
|
}
|
|
27727
27727
|
var _require = __webpack_require__("./src/browser/buffer.ts"), Buffer = _require.Buffer;
|
|
27728
|
-
var _require2 = __webpack_require__("?
|
|
27728
|
+
var _require2 = __webpack_require__("?c028"), inspect = _require2.inspect;
|
|
27729
27729
|
var custom = inspect && inspect.custom || 'inspect';
|
|
27730
27730
|
function copyBuffer(src, target, offset) {
|
|
27731
27731
|
Buffer.prototype.copy.call(src, target, offset);
|
|
@@ -35312,14 +35312,14 @@ var __webpack_modules__ = {
|
|
|
35312
35312
|
"./src/browser/buffer.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
35313
35313
|
__webpack_require__.r(__webpack_exports__);
|
|
35314
35314
|
__webpack_require__.d(__webpack_exports__, {
|
|
35315
|
-
Buffer: ()=>
|
|
35315
|
+
Buffer: ()=>_napi_rs_wasm_runtime_fs__rspack_import_0.hp
|
|
35316
35316
|
});
|
|
35317
|
-
var
|
|
35317
|
+
var _napi_rs_wasm_runtime_fs__rspack_import_0 = __webpack_require__("../../node_modules/.pnpm/@napi-rs+wasm-runtime@1.0.7/node_modules/@napi-rs/wasm-runtime/dist/fs.js");
|
|
35318
35318
|
},
|
|
35319
35319
|
"./src/browser/fs.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
35320
35320
|
__webpack_require__.r(__webpack_exports__);
|
|
35321
35321
|
__webpack_require__.d(__webpack_exports__, {
|
|
35322
|
-
default: ()=>
|
|
35322
|
+
default: ()=>__rspack_default_export,
|
|
35323
35323
|
existsSync: ()=>existsSync,
|
|
35324
35324
|
fs: ()=>fs,
|
|
35325
35325
|
lstat: ()=>lstat,
|
|
@@ -35330,25 +35330,25 @@ var __webpack_modules__ = {
|
|
|
35330
35330
|
volume: ()=>volume,
|
|
35331
35331
|
watch: ()=>watch
|
|
35332
35332
|
});
|
|
35333
|
-
var
|
|
35334
|
-
var
|
|
35335
|
-
const fs =
|
|
35336
|
-
const volume =
|
|
35337
|
-
const memfs =
|
|
35333
|
+
var _napi_rs_wasm_runtime_fs__rspack_import_0 = __webpack_require__("../../node_modules/.pnpm/@napi-rs+wasm-runtime@1.0.7/node_modules/@napi-rs/wasm-runtime/dist/fs.js");
|
|
35334
|
+
var _rspack_binding__rspack_import_1 = __webpack_require__("@rspack/binding");
|
|
35335
|
+
const fs = _rspack_binding__rspack_import_1.__fs;
|
|
35336
|
+
const volume = _rspack_binding__rspack_import_1.__volume;
|
|
35337
|
+
const memfs = _napi_rs_wasm_runtime_fs__rspack_import_0.tO;
|
|
35338
35338
|
const { readFileSync, readdirSync, lstat, existsSync, readdir, watch } = fs;
|
|
35339
|
-
const
|
|
35339
|
+
const __rspack_default_export = fs;
|
|
35340
35340
|
},
|
|
35341
35341
|
"@rspack/binding": function(module1) {
|
|
35342
|
-
module1.exports =
|
|
35342
|
+
module1.exports = __rspack_external__rspack_wasi_browser_js_bd433424;
|
|
35343
35343
|
},
|
|
35344
|
-
"?
|
|
35345
|
-
"?
|
|
35346
|
-
"?
|
|
35347
|
-
"?
|
|
35348
|
-
"?
|
|
35349
|
-
"?
|
|
35350
|
-
"?
|
|
35351
|
-
"?
|
|
35344
|
+
"?4fc0": function() {},
|
|
35345
|
+
"?dcfb": function() {},
|
|
35346
|
+
"?69f8": function() {},
|
|
35347
|
+
"?f42a": function() {},
|
|
35348
|
+
"?5f4e": function() {},
|
|
35349
|
+
"?b05f": function() {},
|
|
35350
|
+
"?c028": function() {},
|
|
35351
|
+
"?8beb": function() {},
|
|
35352
35352
|
"../../node_modules/.pnpm/available-typed-arrays@1.0.7/node_modules/available-typed-arrays/index.js": function(module1, __unused_webpack_exports, __webpack_require__) {
|
|
35353
35353
|
var possibleNames = __webpack_require__("../../node_modules/.pnpm/possible-typed-array-names@1.1.0/node_modules/possible-typed-array-names/index.js");
|
|
35354
35354
|
var g = 'undefined' == typeof globalThis ? __webpack_require__.g : globalThis;
|
|
@@ -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) || [];
|
|
@@ -55355,6 +55355,7 @@ function getRawOutput(output) {
|
|
|
55355
55355
|
function getRawOutputEnvironment(environment = {}) {
|
|
55356
55356
|
return {
|
|
55357
55357
|
const: Boolean(environment.const),
|
|
55358
|
+
methodShorthand: Boolean(environment.methodShorthand),
|
|
55358
55359
|
arrowFunction: Boolean(environment.arrowFunction),
|
|
55359
55360
|
nodePrefixForCoreModules: Boolean(environment.nodePrefixForCoreModules),
|
|
55360
55361
|
asyncFunction: Boolean(environment.asyncFunction),
|
|
@@ -56606,6 +56607,10 @@ RuntimePlugin.getHooks = RuntimePlugin.getCompilationHooks = (compilation)=>{
|
|
|
56606
56607
|
"code",
|
|
56607
56608
|
"chunk"
|
|
56608
56609
|
]),
|
|
56610
|
+
createLink: new SyncWaterfallHook([
|
|
56611
|
+
"code",
|
|
56612
|
+
"chunk"
|
|
56613
|
+
]),
|
|
56609
56614
|
linkPreload: new SyncWaterfallHook([
|
|
56610
56615
|
"code",
|
|
56611
56616
|
"chunk"
|
|
@@ -56627,6 +56632,13 @@ const createRuntimePluginHooksRegisters = (getCompiler, createTap)=>({
|
|
|
56627
56632
|
return queried.call(data.code, data.chunk);
|
|
56628
56633
|
};
|
|
56629
56634
|
}),
|
|
56635
|
+
registerRuntimePluginCreateLinkTaps: createTap(external_rspack_wasi_browser_js_["default"].RegisterJsTapKind.RuntimePluginCreateLink, function() {
|
|
56636
|
+
return RuntimePlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).createLink;
|
|
56637
|
+
}, function(queried) {
|
|
56638
|
+
return function(data) {
|
|
56639
|
+
return queried.call(data.code, data.chunk);
|
|
56640
|
+
};
|
|
56641
|
+
}),
|
|
56630
56642
|
registerRuntimePluginLinkPreloadTaps: createTap(external_rspack_wasi_browser_js_["default"].RegisterJsTapKind.RuntimePluginLinkPreload, function() {
|
|
56631
56643
|
return RuntimePlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).linkPreload;
|
|
56632
56644
|
}, function(queried) {
|
|
@@ -56755,6 +56767,7 @@ function SubresourceIntegrityPlugin_define_property(obj, key, value) {
|
|
|
56755
56767
|
}
|
|
56756
56768
|
const SubresourceIntegrityPlugin_PLUGIN_NAME = "SubresourceIntegrityPlugin";
|
|
56757
56769
|
const NATIVE_HTML_PLUGIN = "HtmlRspackPlugin";
|
|
56770
|
+
const HTTP_PROTOCOL_REGEX = /^https?:/;
|
|
56758
56771
|
const NativeSubresourceIntegrityPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.SubresourceIntegrityPlugin, function(options) {
|
|
56759
56772
|
let htmlPlugin = "Disabled";
|
|
56760
56773
|
if (options.htmlPlugin === NATIVE_HTML_PLUGIN) htmlPlugin = "Native";
|
|
@@ -56792,7 +56805,25 @@ class SubresourceIntegrityPlugin extends NativeSubresourceIntegrityPlugin {
|
|
|
56792
56805
|
if (tag.attributes && "integrity" in tag.attributes) return;
|
|
56793
56806
|
const tagSrc = getTagSrc(tag);
|
|
56794
56807
|
if (!tagSrc) return;
|
|
56795
|
-
|
|
56808
|
+
let isUrlSrc = false;
|
|
56809
|
+
try {
|
|
56810
|
+
const url = new URL(tagSrc);
|
|
56811
|
+
isUrlSrc = "http:" === url.protocol || "https:" === url.protocol;
|
|
56812
|
+
} catch (_) {
|
|
56813
|
+
isUrlSrc = tagSrc.startsWith("//");
|
|
56814
|
+
}
|
|
56815
|
+
let src = "";
|
|
56816
|
+
if (isUrlSrc) {
|
|
56817
|
+
if (!publicPath) return;
|
|
56818
|
+
const protocolRelativePublicPath = publicPath.replace(HTTP_PROTOCOL_REGEX, "");
|
|
56819
|
+
const protocolRelativeTagSrc = tagSrc.replace(HTTP_PROTOCOL_REGEX, "");
|
|
56820
|
+
if (!protocolRelativeTagSrc.startsWith(protocolRelativePublicPath)) return;
|
|
56821
|
+
{
|
|
56822
|
+
const tagSrcWithScheme = `http:${protocolRelativeTagSrc}`;
|
|
56823
|
+
const publicPathWithScheme = protocolRelativePublicPath.startsWith("//") ? `http:${protocolRelativePublicPath}` : protocolRelativePublicPath;
|
|
56824
|
+
src = (0, path_browserify.relative)(publicPathWithScheme, decodeURIComponent(tagSrcWithScheme));
|
|
56825
|
+
}
|
|
56826
|
+
} else src = (0, path_browserify.relative)(publicPath, decodeURIComponent(tagSrc));
|
|
56796
56827
|
tag.attributes.integrity = this.getIntegrityChecksumForAsset(src) || computeIntegrity(this.options.hashFuncNames, (0, browser_fs.readFileSync)((0, path_browserify.join)(outputPath, src)));
|
|
56797
56828
|
tag.attributes.crossorigin = crossOriginLoading || "anonymous";
|
|
56798
56829
|
}
|
|
@@ -57456,6 +57487,35 @@ const browserslistTargetHandler_resolve = (browsers)=>{
|
|
|
57456
57487
|
0
|
|
57457
57488
|
]
|
|
57458
57489
|
}),
|
|
57490
|
+
methodShorthand: rawChecker({
|
|
57491
|
+
chrome: 47,
|
|
57492
|
+
and_chr: 47,
|
|
57493
|
+
edge: 12,
|
|
57494
|
+
firefox: 34,
|
|
57495
|
+
and_ff: 34,
|
|
57496
|
+
opera: 34,
|
|
57497
|
+
op_mob: 34,
|
|
57498
|
+
safari: 9,
|
|
57499
|
+
ios_saf: 9,
|
|
57500
|
+
samsung: 5,
|
|
57501
|
+
android: 47,
|
|
57502
|
+
and_qq: [
|
|
57503
|
+
14,
|
|
57504
|
+
9
|
|
57505
|
+
],
|
|
57506
|
+
and_uc: [
|
|
57507
|
+
15,
|
|
57508
|
+
5
|
|
57509
|
+
],
|
|
57510
|
+
kaios: [
|
|
57511
|
+
2,
|
|
57512
|
+
5
|
|
57513
|
+
],
|
|
57514
|
+
node: [
|
|
57515
|
+
4,
|
|
57516
|
+
9
|
|
57517
|
+
]
|
|
57518
|
+
}),
|
|
57459
57519
|
arrowFunction: rawChecker({
|
|
57460
57520
|
chrome: 45,
|
|
57461
57521
|
and_chr: 45,
|
|
@@ -57853,6 +57913,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
57853
57913
|
const: v(6),
|
|
57854
57914
|
templateLiteral: v(4),
|
|
57855
57915
|
optionalChaining: v(14),
|
|
57916
|
+
methodShorthand: v(4),
|
|
57856
57917
|
arrowFunction: v(6),
|
|
57857
57918
|
asyncFunction: v(7, 6),
|
|
57858
57919
|
forOf: v(5),
|
|
@@ -57892,6 +57953,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
57892
57953
|
const: v(1, 1),
|
|
57893
57954
|
templateLiteral: v(1, 1),
|
|
57894
57955
|
optionalChaining: v(8),
|
|
57956
|
+
methodShorthand: v(1, 1),
|
|
57895
57957
|
arrowFunction: v(1, 1),
|
|
57896
57958
|
asyncFunction: v(1, 7),
|
|
57897
57959
|
forOf: v(0, 36),
|
|
@@ -57927,6 +57989,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
57927
57989
|
const: v(0, 15),
|
|
57928
57990
|
templateLiteral: v(0, 13),
|
|
57929
57991
|
optionalChaining: v(0, 44),
|
|
57992
|
+
methodShorthand: v(0, 15),
|
|
57930
57993
|
arrowFunction: v(0, 15),
|
|
57931
57994
|
asyncFunction: v(0, 21),
|
|
57932
57995
|
forOf: v(0, 13),
|
|
@@ -57949,6 +58012,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
57949
58012
|
const: v >= 2015,
|
|
57950
58013
|
templateLiteral: v >= 2015,
|
|
57951
58014
|
optionalChaining: v >= 2020,
|
|
58015
|
+
methodShorthand: v >= 2015,
|
|
57952
58016
|
arrowFunction: v >= 2015,
|
|
57953
58017
|
forOf: v >= 2015,
|
|
57954
58018
|
destructuring: v >= 2015,
|
|
@@ -58126,7 +58190,7 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
|
58126
58190
|
if ("object" == typeof rspackFuture) {
|
|
58127
58191
|
D(rspackFuture, "bundlerInfo", {});
|
|
58128
58192
|
if ("object" == typeof rspackFuture.bundlerInfo) {
|
|
58129
|
-
D(rspackFuture.bundlerInfo, "version", "1.6.
|
|
58193
|
+
D(rspackFuture.bundlerInfo, "version", "1.6.6");
|
|
58130
58194
|
D(rspackFuture.bundlerInfo, "bundler", "rspack");
|
|
58131
58195
|
D(rspackFuture.bundlerInfo, "force", !library);
|
|
58132
58196
|
}
|
|
@@ -58370,6 +58434,7 @@ const applyOutputDefaults = (output, { context, outputModule, targetProperties:
|
|
|
58370
58434
|
F(environment, "globalThis", ()=>tp?.globalThis);
|
|
58371
58435
|
F(environment, "bigIntLiteral", ()=>tp && optimistic(tp.bigIntLiteral));
|
|
58372
58436
|
F(environment, "const", ()=>tp && optimistic(tp.const));
|
|
58437
|
+
F(environment, "methodShorthand", ()=>tp && optimistic(tp.methodShorthand));
|
|
58373
58438
|
F(environment, "arrowFunction", ()=>tp && optimistic(tp.arrowFunction));
|
|
58374
58439
|
F(environment, "asyncFunction", ()=>tp && optimistic(tp.asyncFunction));
|
|
58375
58440
|
F(environment, "forOf", ()=>tp && optimistic(tp.forOf));
|
|
@@ -58414,7 +58479,7 @@ const applyOutputDefaults = (output, { context, outputModule, targetProperties:
|
|
|
58414
58479
|
D(output, "webassemblyModuleFilename", "[hash].module.wasm");
|
|
58415
58480
|
D(output, "compareBeforeEmit", true);
|
|
58416
58481
|
F(output, "path", ()=>path_browserify_default().join(defaults_process.cwd(), "dist"));
|
|
58417
|
-
F(output, "pathinfo", ()=>
|
|
58482
|
+
F(output, "pathinfo", ()=>false);
|
|
58418
58483
|
D(output, "publicPath", tp && (tp.document || tp.importScripts) ? "auto" : "");
|
|
58419
58484
|
D(output, "hashFunction", "xxhash64");
|
|
58420
58485
|
D(output, "hashDigest", "hex");
|
|
@@ -62075,7 +62140,7 @@ class MultiStats {
|
|
|
62075
62140
|
return obj;
|
|
62076
62141
|
});
|
|
62077
62142
|
if (childOptions.version) {
|
|
62078
|
-
obj.rspackVersion = "1.6.
|
|
62143
|
+
obj.rspackVersion = "1.6.6";
|
|
62079
62144
|
obj.version = "5.75.0";
|
|
62080
62145
|
}
|
|
62081
62146
|
if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join("");
|
|
@@ -63380,7 +63445,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
63380
63445
|
},
|
|
63381
63446
|
version: (object)=>{
|
|
63382
63447
|
object.version = "5.75.0";
|
|
63383
|
-
object.rspackVersion = "1.6.
|
|
63448
|
+
object.rspackVersion = "1.6.6";
|
|
63384
63449
|
},
|
|
63385
63450
|
env: (object, _compilation, _context, { _env })=>{
|
|
63386
63451
|
object.env = _env;
|
|
@@ -66517,7 +66582,7 @@ function transformSync(source, options) {
|
|
|
66517
66582
|
const _options = JSON.stringify(options || {});
|
|
66518
66583
|
return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
|
|
66519
66584
|
}
|
|
66520
|
-
const exports_rspackVersion = "1.6.
|
|
66585
|
+
const exports_rspackVersion = "1.6.6";
|
|
66521
66586
|
const exports_version = "5.75.0";
|
|
66522
66587
|
const exports_WebpackError = Error;
|
|
66523
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 {};
|
package/dist/napi-binding.d.ts
CHANGED
|
@@ -772,6 +772,11 @@ export interface JsCreateData {
|
|
|
772
772
|
resource: string
|
|
773
773
|
}
|
|
774
774
|
|
|
775
|
+
export interface JsCreateLinkData {
|
|
776
|
+
code: string
|
|
777
|
+
chunk: Chunk
|
|
778
|
+
}
|
|
779
|
+
|
|
775
780
|
export interface JsCreateScriptData {
|
|
776
781
|
code: string
|
|
777
782
|
chunk: Chunk
|
|
@@ -1512,6 +1517,8 @@ export interface KnownAssetInfo {
|
|
|
1512
1517
|
cssUnusedIdents?: Array<string>
|
|
1513
1518
|
/** whether this asset is over the size limit */
|
|
1514
1519
|
isOverSizeLimit?: boolean
|
|
1520
|
+
/** the asset type */
|
|
1521
|
+
assetType?: string
|
|
1515
1522
|
}
|
|
1516
1523
|
|
|
1517
1524
|
export declare function loadBrowserslist(input: string | undefined | null, context: string): Array<string> | null
|
|
@@ -2079,6 +2086,7 @@ export interface RawEntryDynamicResult {
|
|
|
2079
2086
|
|
|
2080
2087
|
export interface RawEnvironment {
|
|
2081
2088
|
const?: boolean
|
|
2089
|
+
methodShorthand?: boolean
|
|
2082
2090
|
arrowFunction?: boolean
|
|
2083
2091
|
nodePrefixForCoreModules?: boolean
|
|
2084
2092
|
asyncFunction?: boolean
|
|
@@ -2964,13 +2972,14 @@ export declare enum RegisterJsTapKind {
|
|
|
2964
2972
|
HtmlPluginBeforeEmit = 39,
|
|
2965
2973
|
HtmlPluginAfterEmit = 40,
|
|
2966
2974
|
RuntimePluginCreateScript = 41,
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2975
|
+
RuntimePluginCreateLink = 42,
|
|
2976
|
+
RuntimePluginLinkPreload = 43,
|
|
2977
|
+
RuntimePluginLinkPrefetch = 44,
|
|
2978
|
+
RsdoctorPluginModuleGraph = 45,
|
|
2979
|
+
RsdoctorPluginChunkGraph = 46,
|
|
2980
|
+
RsdoctorPluginModuleIds = 47,
|
|
2981
|
+
RsdoctorPluginModuleSources = 48,
|
|
2982
|
+
RsdoctorPluginAssets = 49
|
|
2974
2983
|
}
|
|
2975
2984
|
|
|
2976
2985
|
export interface RegisterJsTaps {
|
|
@@ -3016,7 +3025,8 @@ export interface RegisterJsTaps {
|
|
|
3016
3025
|
registerHtmlPluginBeforeEmitTaps: (stages: Array<number>) => Array<{ function: ((arg: JsBeforeEmitData) => JsBeforeEmitData); stage: number; }>
|
|
3017
3026
|
registerHtmlPluginAfterEmitTaps: (stages: Array<number>) => Array<{ function: ((arg: JsAfterEmitData) => JsAfterEmitData); stage: number; }>
|
|
3018
3027
|
registerRuntimePluginCreateScriptTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCreateScriptData) => String); stage: number; }>
|
|
3019
|
-
|
|
3028
|
+
registerRuntimePluginCreateLinkTaps: (stages: Array<number>) => Array<{ function: ((arg: JsLinkPreloadData) => String); stage: number; }>
|
|
3029
|
+
registerRuntimePluginLinkPreloadTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCreateLinkData) => String); stage: number; }>
|
|
3020
3030
|
registerRuntimePluginLinkPrefetchTaps: (stages: Array<number>) => Array<{ function: ((arg: JsLinkPrefetchData) => String); stage: number; }>
|
|
3021
3031
|
registerRsdoctorPluginModuleGraphTaps: (stages: Array<number>) => Array<{ function: ((arg: JsRsdoctorModuleGraph) => Promise<boolean | undefined>); stage: number; }>
|
|
3022
3032
|
registerRsdoctorPluginChunkGraphTaps: (stages: Array<number>) => Array<{ function: ((arg: JsRsdoctorChunkGraph) => Promise<boolean | undefined>); stage: number; }>
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/browser",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.6",
|
|
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.",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@napi-rs/wasm-runtime": "1.0.7",
|
|
34
34
|
"@rspack/lite-tapable": "1.1.0",
|
|
35
35
|
"@swc/types": "0.1.25",
|
|
36
|
-
"@types/watchpack": "^2.4.
|
|
36
|
+
"@types/watchpack": "^2.4.5",
|
|
37
37
|
"memfs": "4.48.1",
|
|
38
38
|
"webpack-sources": "3.3.3"
|
|
39
39
|
},
|