@rspack/browser 1.7.1 → 1.7.2
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 +2 -2
- package/dist/RuntimeModule.d.ts +3 -1
- package/dist/browser/service.d.ts +1 -1
- package/dist/config/target.d.ts +2 -0
- package/dist/config/types.d.ts +7 -0
- package/dist/index.mjs +82 -34
- package/dist/napi-binding.d.ts +8 -0
- package/dist/rspack.wasm32-wasi.wasm +0 -0
- package/package.json +1 -1
package/dist/Compilation.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Copyright (c) JS Foundation and other contributors
|
|
8
8
|
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
9
|
*/
|
|
10
|
-
import type { AssetInfo, ChunkGroup, Dependency, ExternalObject, JsCompilation
|
|
10
|
+
import type { AssetInfo, ChunkGroup, Dependency, ExternalObject, JsCompilation } from '@rspack/binding';
|
|
11
11
|
import binding from '@rspack/binding';
|
|
12
12
|
export type { AssetInfo } from '@rspack/binding';
|
|
13
13
|
import * as liteTapable from '@rspack/lite-tapable';
|
|
@@ -185,7 +185,7 @@ export declare class Compilation {
|
|
|
185
185
|
Set<string>
|
|
186
186
|
]>;
|
|
187
187
|
runtimeRequirementInTree: liteTapable.HookMap<liteTapable.SyncBailHook<[Chunk, Set<string>], void>>;
|
|
188
|
-
runtimeModule: liteTapable.SyncHook<[
|
|
188
|
+
runtimeModule: liteTapable.SyncHook<[RuntimeModule, Chunk]>;
|
|
189
189
|
seal: liteTapable.SyncHook<[]>;
|
|
190
190
|
afterSeal: liteTapable.AsyncSeriesHook<[], void>;
|
|
191
191
|
needAdditionalPass: liteTapable.SyncBailHook<[], boolean>;
|
package/dist/RuntimeModule.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JsAddingRuntimeModule } from '@rspack/binding';
|
|
1
|
+
import type { JsAddingRuntimeModule, JsRuntimeModule, JsSource } from '@rspack/binding';
|
|
2
2
|
import type { Chunk } from './Chunk';
|
|
3
3
|
import type { ChunkGraph } from './ChunkGraph';
|
|
4
4
|
import type { Compilation } from './Compilation';
|
|
@@ -23,6 +23,7 @@ export declare class RuntimeModule {
|
|
|
23
23
|
protected chunkGraph: ChunkGraph | null;
|
|
24
24
|
constructor(name: string, stage?: RuntimeModuleStage);
|
|
25
25
|
attach(compilation: Compilation, chunk: Chunk, chunkGraph: ChunkGraph): void;
|
|
26
|
+
get source(): JsSource | undefined;
|
|
26
27
|
get name(): string;
|
|
27
28
|
get stage(): RuntimeModuleStage;
|
|
28
29
|
identifier(): string;
|
|
@@ -30,3 +31,4 @@ export declare class RuntimeModule {
|
|
|
30
31
|
shouldIsolate(): boolean;
|
|
31
32
|
generate(): string;
|
|
32
33
|
}
|
|
34
|
+
export declare function createRenderedRuntimeModule(module: JsRuntimeModule): RuntimeModule;
|
package/dist/config/target.d.ts
CHANGED
|
@@ -38,6 +38,8 @@ export type ApiTargetProperties = {
|
|
|
38
38
|
importScripts: boolean | null;
|
|
39
39
|
/** has importScripts available when creating a worker */
|
|
40
40
|
importScriptsInWorker: boolean | null;
|
|
41
|
+
/** node.js allows to use `import.meta.dirname` and `import.meta.filename` */
|
|
42
|
+
importMetaDirnameAndFilename: boolean | null;
|
|
41
43
|
/** has fetch function available for WebAssembly */
|
|
42
44
|
fetchWasm: boolean | null;
|
|
43
45
|
/** has global variable available */
|
package/dist/config/types.d.ts
CHANGED
|
@@ -272,6 +272,8 @@ export type Environment = {
|
|
|
272
272
|
dynamicImport?: boolean;
|
|
273
273
|
/** The environment supports an async import() when creating a worker, only for web targets at the moment. */
|
|
274
274
|
dynamicImportInWorker?: boolean;
|
|
275
|
+
/** The environment supports `import.meta.dirname` and `import.meta.filename`. */
|
|
276
|
+
importMetaDirnameAndFilename?: boolean;
|
|
275
277
|
/** The environment supports 'for of' iteration ('for (const x of array) { ... }'). */
|
|
276
278
|
forOf?: boolean;
|
|
277
279
|
/** The environment supports 'globalThis'. */
|
|
@@ -851,6 +853,11 @@ export type JavascriptParserOptions = {
|
|
|
851
853
|
worker?: string[] | boolean;
|
|
852
854
|
/** Override the module to strict or non-strict. */
|
|
853
855
|
overrideStrict?: 'strict' | 'non-strict';
|
|
856
|
+
/**
|
|
857
|
+
* Control whether renaming of the CommonJS `require` function will be parsed and transformed.
|
|
858
|
+
* @default true
|
|
859
|
+
*/
|
|
860
|
+
requireAlias?: boolean;
|
|
854
861
|
requireAsExpression?: boolean;
|
|
855
862
|
requireDynamic?: boolean;
|
|
856
863
|
requireResolve?: boolean;
|
package/dist/index.mjs
CHANGED
|
@@ -50923,6 +50923,7 @@ class RuntimeModule {
|
|
|
50923
50923
|
this.chunk = chunk;
|
|
50924
50924
|
this.chunkGraph = chunkGraph;
|
|
50925
50925
|
}
|
|
50926
|
+
get source() {}
|
|
50926
50927
|
get name() {
|
|
50927
50928
|
return this._name;
|
|
50928
50929
|
}
|
|
@@ -50957,6 +50958,38 @@ RuntimeModule_define_property(RuntimeModule, "STAGE_NORMAL", 0);
|
|
|
50957
50958
|
RuntimeModule_define_property(RuntimeModule, "STAGE_BASIC", 5);
|
|
50958
50959
|
RuntimeModule_define_property(RuntimeModule, "STAGE_ATTACH", 10);
|
|
50959
50960
|
RuntimeModule_define_property(RuntimeModule, "STAGE_TRIGGER", 20);
|
|
50961
|
+
function createRenderedRuntimeModule(module1) {
|
|
50962
|
+
const RuntimeModuleClass = {
|
|
50963
|
+
[module1.constructorName]: class extends RuntimeModule {
|
|
50964
|
+
get constructorName() {
|
|
50965
|
+
return module1.constructorName;
|
|
50966
|
+
}
|
|
50967
|
+
get moduleIdentifier() {
|
|
50968
|
+
return module1.moduleIdentifier;
|
|
50969
|
+
}
|
|
50970
|
+
get source() {
|
|
50971
|
+
return this._source;
|
|
50972
|
+
}
|
|
50973
|
+
identifier() {
|
|
50974
|
+
return module1.moduleIdentifier;
|
|
50975
|
+
}
|
|
50976
|
+
readableIdentifier() {
|
|
50977
|
+
return module1.moduleIdentifier;
|
|
50978
|
+
}
|
|
50979
|
+
shouldIsolate() {
|
|
50980
|
+
return module1.isolate;
|
|
50981
|
+
}
|
|
50982
|
+
generate() {
|
|
50983
|
+
return this._source?.source.toString('utf-8') || '';
|
|
50984
|
+
}
|
|
50985
|
+
constructor(){
|
|
50986
|
+
super(module1.name, module1.stage), RuntimeModule_define_property(this, "_source", void 0);
|
|
50987
|
+
this._source = module1.source;
|
|
50988
|
+
}
|
|
50989
|
+
}
|
|
50990
|
+
}[module1.constructorName];
|
|
50991
|
+
return new RuntimeModuleClass();
|
|
50992
|
+
}
|
|
50960
50993
|
function Stats_check_private_redeclaration(obj, privateCollection) {
|
|
50961
50994
|
if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
50962
50995
|
}
|
|
@@ -54370,8 +54403,8 @@ class ModuleWarning extends lib_WebpackError {
|
|
|
54370
54403
|
this.details = getErrorDetails(err);
|
|
54371
54404
|
}
|
|
54372
54405
|
}
|
|
54373
|
-
|
|
54374
|
-
|
|
54406
|
+
function service_run() {
|
|
54407
|
+
return Promise.reject(new Error('Not support browser'));
|
|
54375
54408
|
}
|
|
54376
54409
|
class LoadingLoaderError extends Error {
|
|
54377
54410
|
constructor(message){
|
|
@@ -55354,11 +55387,13 @@ function getRawOutputEnvironment(environment = {}) {
|
|
|
55354
55387
|
destructuring: Boolean(environment.destructuring),
|
|
55355
55388
|
document: Boolean(environment.document),
|
|
55356
55389
|
dynamicImport: Boolean(environment.dynamicImport),
|
|
55390
|
+
dynamicImportInWorker: Boolean(environment.dynamicImportInWorker),
|
|
55357
55391
|
forOf: Boolean(environment.forOf),
|
|
55358
55392
|
globalThis: Boolean(environment.globalThis),
|
|
55359
55393
|
module: Boolean(environment.module),
|
|
55360
55394
|
optionalChaining: Boolean(environment.optionalChaining),
|
|
55361
|
-
templateLiteral: Boolean(environment.templateLiteral)
|
|
55395
|
+
templateLiteral: Boolean(environment.templateLiteral),
|
|
55396
|
+
importMetaDirnameAndFilename: Boolean(environment.importMetaDirnameAndFilename)
|
|
55362
55397
|
};
|
|
55363
55398
|
}
|
|
55364
55399
|
function getRawExtensionAlias(alias = {}) {
|
|
@@ -55616,6 +55651,7 @@ function getRawJavascriptParserOptions(parser) {
|
|
|
55616
55651
|
] : [] : parser.worker,
|
|
55617
55652
|
overrideStrict: parser.overrideStrict,
|
|
55618
55653
|
requireAsExpression: parser.requireAsExpression,
|
|
55654
|
+
requireAlias: parser.requireAlias,
|
|
55619
55655
|
requireDynamic: parser.requireDynamic,
|
|
55620
55656
|
requireResolve: parser.requireResolve,
|
|
55621
55657
|
commonjs: parser.commonjs,
|
|
@@ -55843,7 +55879,7 @@ class ExternalsPlugin extends RspackBuiltinPlugin {
|
|
|
55843
55879
|
if ('string' == typeof item || item instanceof RegExp) return item;
|
|
55844
55880
|
if ('function' == typeof item) {
|
|
55845
55881
|
const processResolveResult = ExternalsPlugin_class_private_field_get(this, _processResolveResult);
|
|
55846
|
-
return async (ctx)=>
|
|
55882
|
+
return async (ctx)=>new Promise((resolve, reject)=>{
|
|
55847
55883
|
const data = ctx.data();
|
|
55848
55884
|
const promise = item({
|
|
55849
55885
|
request: data.request,
|
|
@@ -56537,35 +56573,35 @@ const createRsdoctorPluginHooksRegisters = (getCompiler, createTap)=>({
|
|
|
56537
56573
|
return RsdoctorPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).moduleGraph;
|
|
56538
56574
|
}, function(queried) {
|
|
56539
56575
|
return async function(data) {
|
|
56540
|
-
return
|
|
56576
|
+
return queried.promise(data);
|
|
56541
56577
|
};
|
|
56542
56578
|
}),
|
|
56543
56579
|
registerRsdoctorPluginChunkGraphTaps: createTap(external_rspack_wasi_browser_js_.RegisterJsTapKind.RsdoctorPluginChunkGraph, function() {
|
|
56544
56580
|
return RsdoctorPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).chunkGraph;
|
|
56545
56581
|
}, function(queried) {
|
|
56546
56582
|
return async function(data) {
|
|
56547
|
-
return
|
|
56583
|
+
return queried.promise(data);
|
|
56548
56584
|
};
|
|
56549
56585
|
}),
|
|
56550
56586
|
registerRsdoctorPluginModuleIdsTaps: createTap(external_rspack_wasi_browser_js_.RegisterJsTapKind.RsdoctorPluginModuleIds, function() {
|
|
56551
56587
|
return RsdoctorPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).moduleIds;
|
|
56552
56588
|
}, function(queried) {
|
|
56553
56589
|
return async function(data) {
|
|
56554
|
-
return
|
|
56590
|
+
return queried.promise(data);
|
|
56555
56591
|
};
|
|
56556
56592
|
}),
|
|
56557
56593
|
registerRsdoctorPluginModuleSourcesTaps: createTap(external_rspack_wasi_browser_js_.RegisterJsTapKind.RsdoctorPluginModuleSources, function() {
|
|
56558
56594
|
return RsdoctorPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).moduleSources;
|
|
56559
56595
|
}, function(queried) {
|
|
56560
56596
|
return async function(data) {
|
|
56561
|
-
return
|
|
56597
|
+
return queried.promise(data);
|
|
56562
56598
|
};
|
|
56563
56599
|
}),
|
|
56564
56600
|
registerRsdoctorPluginAssetsTaps: createTap(external_rspack_wasi_browser_js_.RegisterJsTapKind.RsdoctorPluginAssets, function() {
|
|
56565
56601
|
return RsdoctorPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).assets;
|
|
56566
56602
|
}, function(queried) {
|
|
56567
56603
|
return async function(data) {
|
|
56568
|
-
return
|
|
56604
|
+
return queried.promise(data);
|
|
56569
56605
|
};
|
|
56570
56606
|
})
|
|
56571
56607
|
});
|
|
@@ -56830,16 +56866,16 @@ class SubresourceIntegrityPlugin extends NativeSubresourceIntegrityPlugin {
|
|
|
56830
56866
|
'async-node'
|
|
56831
56867
|
].includes(compiler.options.output.chunkLoading)) return;
|
|
56832
56868
|
const hwpHooks = getHooks(compilation);
|
|
56833
|
-
hwpHooks.beforeAssetTagGeneration.tapPromise(SubresourceIntegrityPlugin_PLUGIN_NAME,
|
|
56869
|
+
hwpHooks.beforeAssetTagGeneration.tapPromise(SubresourceIntegrityPlugin_PLUGIN_NAME, (data)=>{
|
|
56834
56870
|
self1.handleHwpPluginArgs(data);
|
|
56835
|
-
return data;
|
|
56871
|
+
return Promise.resolve(data);
|
|
56836
56872
|
});
|
|
56837
56873
|
hwpHooks.alterAssetTagGroups.tapPromise({
|
|
56838
56874
|
name: SubresourceIntegrityPlugin_PLUGIN_NAME,
|
|
56839
56875
|
stage: 10000
|
|
56840
|
-
},
|
|
56876
|
+
}, (data)=>{
|
|
56841
56877
|
self1.handleHwpBodyTags(data, compiler.outputPath, compiler.options.output.crossOriginLoading);
|
|
56842
|
-
return data;
|
|
56878
|
+
return Promise.resolve(data);
|
|
56843
56879
|
});
|
|
56844
56880
|
});
|
|
56845
56881
|
}
|
|
@@ -57791,6 +57827,12 @@ const browserslistTargetHandler_resolve = (browsers)=>{
|
|
|
57791
57827
|
18
|
|
57792
57828
|
]
|
|
57793
57829
|
}),
|
|
57830
|
+
importMetaDirnameAndFilename: nodeProperty && rawChecker({
|
|
57831
|
+
node: [
|
|
57832
|
+
22,
|
|
57833
|
+
16
|
|
57834
|
+
]
|
|
57835
|
+
}),
|
|
57794
57836
|
require: nodeProperty
|
|
57795
57837
|
};
|
|
57796
57838
|
};
|
|
@@ -57880,6 +57922,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
57880
57922
|
require: !asyncFlag,
|
|
57881
57923
|
nodeBuiltins: true,
|
|
57882
57924
|
nodePrefixForCoreModules: +major < 15 ? v(14, 18) : v(16),
|
|
57925
|
+
importMetaDirnameAndFilename: v(22, 16),
|
|
57883
57926
|
global: true,
|
|
57884
57927
|
document: false,
|
|
57885
57928
|
fetchWasm: false,
|
|
@@ -57920,6 +57963,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
57920
57963
|
global: true,
|
|
57921
57964
|
nodeBuiltins: true,
|
|
57922
57965
|
nodePrefixForCoreModules: v(15),
|
|
57966
|
+
importMetaDirnameAndFilename: v(37),
|
|
57923
57967
|
require: true,
|
|
57924
57968
|
document: 'renderer' === context,
|
|
57925
57969
|
fetchWasm: 'renderer' === context,
|
|
@@ -58172,7 +58216,7 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
|
58172
58216
|
if ('object' == typeof rspackFuture) {
|
|
58173
58217
|
D(rspackFuture, 'bundlerInfo', {});
|
|
58174
58218
|
if ('object' == typeof rspackFuture.bundlerInfo) {
|
|
58175
|
-
D(rspackFuture.bundlerInfo, 'version', "1.7.
|
|
58219
|
+
D(rspackFuture.bundlerInfo, 'version', "1.7.2");
|
|
58176
58220
|
D(rspackFuture.bundlerInfo, 'bundler', 'rspack');
|
|
58177
58221
|
D(rspackFuture.bundlerInfo, 'force', !library);
|
|
58178
58222
|
}
|
|
@@ -58190,6 +58234,7 @@ const applyJavascriptParserOptionsDefaults = (parserOptions, { deferImport })=>{
|
|
|
58190
58234
|
D(parserOptions, 'wrappedContextRegExp', /.*/);
|
|
58191
58235
|
D(parserOptions, 'strictExportPresence', false);
|
|
58192
58236
|
D(parserOptions, 'requireAsExpression', true);
|
|
58237
|
+
D(parserOptions, 'requireAlias', true);
|
|
58193
58238
|
D(parserOptions, 'requireDynamic', true);
|
|
58194
58239
|
D(parserOptions, 'requireResolve', true);
|
|
58195
58240
|
D(parserOptions, 'commonjs', true);
|
|
@@ -58437,6 +58482,7 @@ const applyOutputDefaults = (output, { context, outputModule, targetProperties:
|
|
|
58437
58482
|
F(environment, 'destructuring', ()=>tp && optimistic(tp.destructuring));
|
|
58438
58483
|
F(environment, 'optionalChaining', ()=>tp && optimistic(tp.optionalChaining));
|
|
58439
58484
|
F(environment, 'nodePrefixForCoreModules', ()=>tp && optimistic(tp.nodePrefixForCoreModules));
|
|
58485
|
+
F(environment, 'importMetaDirnameAndFilename', ()=>tp?.importMetaDirnameAndFilename);
|
|
58440
58486
|
F(environment, 'templateLiteral', ()=>tp && optimistic(tp.templateLiteral));
|
|
58441
58487
|
F(environment, 'dynamicImport', ()=>conditionallyOptimistic(tp?.dynamicImport, output.module));
|
|
58442
58488
|
F(environment, 'dynamicImportInWorker', ()=>conditionallyOptimistic(tp?.dynamicImportInWorker, output.module));
|
|
@@ -59776,26 +59822,25 @@ class ThreadsafeIntermediateNodeFS extends ThreadsafeOutputNodeFS {
|
|
|
59776
59822
|
this.close = memoizeFn(()=>util_0_default().promisify(fs.close.bind(fs)));
|
|
59777
59823
|
this.write = memoizeFn(()=>{
|
|
59778
59824
|
const writeFn = util_0_default().promisify(fs.write.bind(fs));
|
|
59779
|
-
return async (fd, content, position)=>
|
|
59825
|
+
return async (fd, content, position)=>writeFn(fd, content, {
|
|
59780
59826
|
position
|
|
59781
59827
|
});
|
|
59782
59828
|
});
|
|
59783
59829
|
this.writeAll = memoizeFn(()=>{
|
|
59784
59830
|
const writeFn = util_0_default().promisify(fs.writeFile.bind(fs));
|
|
59785
|
-
return async (fd, content)=>
|
|
59831
|
+
return async (fd, content)=>writeFn(fd, content);
|
|
59786
59832
|
});
|
|
59787
59833
|
this.read = memoizeFn(()=>{
|
|
59788
59834
|
const readFn = fs.read.bind(fs);
|
|
59789
|
-
return
|
|
59790
|
-
new Promise((resolve)=>{
|
|
59835
|
+
return (fd, length, position)=>new Promise((resolve, reject)=>{
|
|
59791
59836
|
readFn(fd, {
|
|
59792
59837
|
position,
|
|
59793
59838
|
length
|
|
59794
59839
|
}, (err, _bytesRead, buffer)=>{
|
|
59795
|
-
|
|
59840
|
+
if (err) reject(err);
|
|
59841
|
+
else resolve(buffer);
|
|
59796
59842
|
});
|
|
59797
59843
|
});
|
|
59798
|
-
};
|
|
59799
59844
|
});
|
|
59800
59845
|
this.readUntil = memoizeFn(()=>async (fd, delim, position)=>{
|
|
59801
59846
|
const res = [];
|
|
@@ -60441,7 +60486,7 @@ class MultiStats {
|
|
|
60441
60486
|
return obj;
|
|
60442
60487
|
});
|
|
60443
60488
|
if (childOptions.version) {
|
|
60444
|
-
obj.rspackVersion = "1.7.
|
|
60489
|
+
obj.rspackVersion = "1.7.2";
|
|
60445
60490
|
obj.version = "5.75.0";
|
|
60446
60491
|
}
|
|
60447
60492
|
if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join('');
|
|
@@ -62273,7 +62318,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
62273
62318
|
},
|
|
62274
62319
|
version: (object)=>{
|
|
62275
62320
|
object.version = "5.75.0";
|
|
62276
|
-
object.rspackVersion = "1.7.
|
|
62321
|
+
object.rspackVersion = "1.7.2";
|
|
62277
62322
|
},
|
|
62278
62323
|
env: (object, _compilation, _context, { _env })=>{
|
|
62279
62324
|
object.env = _env;
|
|
@@ -64301,8 +64346,11 @@ const createCompilationHooksRegisters = (getCompiler, createTap, createMapTap)=>
|
|
|
64301
64346
|
return getCompiler().__internal__get_compilation().hooks.runtimeModule;
|
|
64302
64347
|
}, function(queried) {
|
|
64303
64348
|
return function({ module: module1, chunk }) {
|
|
64349
|
+
const runtimeModule = createRenderedRuntimeModule(module1);
|
|
64350
|
+
const compilation = getCompiler().__internal__get_compilation();
|
|
64351
|
+
runtimeModule.attach(compilation, chunk, compilation.chunkGraph);
|
|
64304
64352
|
const originSource = module1.source?.source;
|
|
64305
|
-
queried.call(
|
|
64353
|
+
queried.call(runtimeModule, chunk);
|
|
64306
64354
|
const newSource = module1.source?.source;
|
|
64307
64355
|
if (newSource && newSource !== originSource) return module1;
|
|
64308
64356
|
};
|
|
@@ -64378,7 +64426,7 @@ const createCompilationHooksRegisters = (getCompiler, createTap, createMapTap)=>
|
|
|
64378
64426
|
return getCompiler().__internal__get_compilation().hooks.finishModules;
|
|
64379
64427
|
}, function(queried) {
|
|
64380
64428
|
return async function() {
|
|
64381
|
-
return
|
|
64429
|
+
return queried.promise(getCompiler().__internal__get_compilation().modules);
|
|
64382
64430
|
};
|
|
64383
64431
|
}),
|
|
64384
64432
|
registerCompilationOptimizeModulesTaps: createTap(external_rspack_wasi_browser_js_["default"].RegisterJsTapKind.CompilationOptimizeModules, function() {
|
|
@@ -64399,14 +64447,14 @@ const createCompilationHooksRegisters = (getCompiler, createTap, createMapTap)=>
|
|
|
64399
64447
|
return getCompiler().__internal__get_compilation().hooks.optimizeTree;
|
|
64400
64448
|
}, function(queried) {
|
|
64401
64449
|
return async function() {
|
|
64402
|
-
return
|
|
64450
|
+
return queried.promise(getCompiler().__internal__get_compilation().chunks, getCompiler().__internal__get_compilation().modules);
|
|
64403
64451
|
};
|
|
64404
64452
|
}),
|
|
64405
64453
|
registerCompilationOptimizeChunkModulesTaps: createTap(external_rspack_wasi_browser_js_["default"].RegisterJsTapKind.CompilationOptimizeChunkModules, function() {
|
|
64406
64454
|
return getCompiler().__internal__get_compilation().hooks.optimizeChunkModules;
|
|
64407
64455
|
}, function(queried) {
|
|
64408
64456
|
return async function() {
|
|
64409
|
-
return
|
|
64457
|
+
return queried.promise(getCompiler().__internal__get_compilation().chunks, getCompiler().__internal__get_compilation().modules);
|
|
64410
64458
|
};
|
|
64411
64459
|
}),
|
|
64412
64460
|
registerCompilationChunkHashTaps: createTap(external_rspack_wasi_browser_js_["default"].RegisterJsTapKind.CompilationChunkHash, function() {
|
|
@@ -64432,7 +64480,7 @@ const createCompilationHooksRegisters = (getCompiler, createTap, createMapTap)=>
|
|
|
64432
64480
|
return getCompiler().__internal__get_compilation().hooks.processAssets;
|
|
64433
64481
|
}, function(queried) {
|
|
64434
64482
|
return async function() {
|
|
64435
|
-
return
|
|
64483
|
+
return queried.promise(getCompiler().__internal__get_compilation().assets);
|
|
64436
64484
|
};
|
|
64437
64485
|
}),
|
|
64438
64486
|
registerCompilationAfterProcessAssetsTaps: createTap(external_rspack_wasi_browser_js_["default"].RegisterJsTapKind.CompilationAfterProcessAssets, function() {
|
|
@@ -64453,7 +64501,7 @@ const createCompilationHooksRegisters = (getCompiler, createTap, createMapTap)=>
|
|
|
64453
64501
|
return getCompiler().__internal__get_compilation().hooks.afterSeal;
|
|
64454
64502
|
}, function(queried) {
|
|
64455
64503
|
return async function() {
|
|
64456
|
-
return
|
|
64504
|
+
return queried.promise();
|
|
64457
64505
|
};
|
|
64458
64506
|
})
|
|
64459
64507
|
});
|
|
@@ -64477,14 +64525,14 @@ const createCompilerHooksRegisters = (getCompiler, createTap)=>({
|
|
|
64477
64525
|
return getCompiler().hooks.make;
|
|
64478
64526
|
}, function(queried) {
|
|
64479
64527
|
return async function() {
|
|
64480
|
-
return
|
|
64528
|
+
return queried.promise(getCompiler().__internal__get_compilation());
|
|
64481
64529
|
};
|
|
64482
64530
|
}),
|
|
64483
64531
|
registerCompilerFinishMakeTaps: createTap(external_rspack_wasi_browser_js_["default"].RegisterJsTapKind.CompilerFinishMake, function() {
|
|
64484
64532
|
return getCompiler().hooks.finishMake;
|
|
64485
64533
|
}, function(queried) {
|
|
64486
64534
|
return async function() {
|
|
64487
|
-
return
|
|
64535
|
+
return queried.promise(getCompiler().__internal__get_compilation());
|
|
64488
64536
|
};
|
|
64489
64537
|
}),
|
|
64490
64538
|
registerCompilerShouldEmitTaps: createTap(external_rspack_wasi_browser_js_["default"].RegisterJsTapKind.CompilerShouldEmit, function() {
|
|
@@ -64498,14 +64546,14 @@ const createCompilerHooksRegisters = (getCompiler, createTap)=>({
|
|
|
64498
64546
|
return getCompiler().hooks.emit;
|
|
64499
64547
|
}, function(queried) {
|
|
64500
64548
|
return async function() {
|
|
64501
|
-
return
|
|
64549
|
+
return queried.promise(getCompiler().__internal__get_compilation());
|
|
64502
64550
|
};
|
|
64503
64551
|
}),
|
|
64504
64552
|
registerCompilerAfterEmitTaps: createTap(external_rspack_wasi_browser_js_["default"].RegisterJsTapKind.CompilerAfterEmit, function() {
|
|
64505
64553
|
return getCompiler().hooks.afterEmit;
|
|
64506
64554
|
}, function(queried) {
|
|
64507
64555
|
return async function() {
|
|
64508
|
-
return
|
|
64556
|
+
return queried.promise(getCompiler().__internal__get_compilation());
|
|
64509
64557
|
};
|
|
64510
64558
|
}),
|
|
64511
64559
|
registerCompilerAssetEmittedTaps: createTap(external_rspack_wasi_browser_js_["default"].RegisterJsTapKind.CompilerAssetEmitted, function() {
|
|
@@ -66940,7 +66988,7 @@ function transformSync(source, options) {
|
|
|
66940
66988
|
const _options = JSON.stringify(options || {});
|
|
66941
66989
|
return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
|
|
66942
66990
|
}
|
|
66943
|
-
const exports_rspackVersion = "1.7.
|
|
66991
|
+
const exports_rspackVersion = "1.7.2";
|
|
66944
66992
|
const exports_version = "5.75.0";
|
|
66945
66993
|
const exports_WebpackError = Error;
|
|
66946
66994
|
const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
|
|
@@ -67003,7 +67051,7 @@ const exports_experiments = {
|
|
|
67003
67051
|
},
|
|
67004
67052
|
async cleanup () {
|
|
67005
67053
|
await trace_JavaScriptTracer.cleanupJavaScriptTrace();
|
|
67006
|
-
|
|
67054
|
+
(0, external_rspack_wasi_browser_js_.syncTraceEvent)(trace_JavaScriptTracer.events);
|
|
67007
67055
|
(0, external_rspack_wasi_browser_js_.cleanupGlobalTrace)();
|
|
67008
67056
|
}
|
|
67009
67057
|
},
|
package/dist/napi-binding.d.ts
CHANGED
|
@@ -1205,6 +1205,8 @@ export interface JsRuntimeModule {
|
|
|
1205
1205
|
moduleIdentifier: string
|
|
1206
1206
|
constructorName: string
|
|
1207
1207
|
name: string
|
|
1208
|
+
stage: number
|
|
1209
|
+
isolate: boolean
|
|
1208
1210
|
}
|
|
1209
1211
|
|
|
1210
1212
|
export interface JsRuntimeModuleArg {
|
|
@@ -2337,6 +2339,11 @@ export interface RawJavascriptParserOptions {
|
|
|
2337
2339
|
worker?: Array<string>
|
|
2338
2340
|
overrideStrict?: string
|
|
2339
2341
|
importMeta?: boolean
|
|
2342
|
+
/**
|
|
2343
|
+
* This option is experimental in Rspack only and subject to change or be removed anytime.
|
|
2344
|
+
* @experimental
|
|
2345
|
+
*/
|
|
2346
|
+
requireAlias?: boolean
|
|
2340
2347
|
/**
|
|
2341
2348
|
* This option is experimental in Rspack only and subject to change or be removed anytime.
|
|
2342
2349
|
* @experimental
|
|
@@ -2790,6 +2797,7 @@ export interface RawRstestPluginOptions {
|
|
|
2790
2797
|
importMetaPathName: boolean
|
|
2791
2798
|
hoistMockModule: boolean
|
|
2792
2799
|
manualMockRoot: string
|
|
2800
|
+
preserveNewUrl?: Array<string>
|
|
2793
2801
|
}
|
|
2794
2802
|
|
|
2795
2803
|
export interface RawRuleSetCondition {
|
|
Binary file
|
package/package.json
CHANGED