@rspack/core 1.3.9 → 1.3.10
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/ChunkGraph.d.ts +1 -0
- package/dist/CodeGenerationResults.d.ts +1 -0
- package/dist/Compilation.d.ts +5 -1
- package/dist/Module.d.ts +0 -7
- package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +1 -1
- package/dist/config/adapter.d.ts +2 -2
- package/dist/config/types.d.ts +24 -0
- package/dist/config/zod.d.ts +57 -12
- package/dist/index.js +205 -174
- package/dist/taps/compilation.d.ts +6 -0
- package/dist/trace/index.d.ts +2 -3
- package/package.json +2 -2
package/dist/ChunkGraph.d.ts
CHANGED
@@ -7,6 +7,7 @@ export declare class ChunkGraph {
|
|
7
7
|
#private;
|
8
8
|
static __from_binding(binding: JsChunkGraph): ChunkGraph;
|
9
9
|
constructor(binding: JsChunkGraph);
|
10
|
+
hasChunkEntryDependentChunks(chunk: Chunk): boolean;
|
10
11
|
getChunkModules(chunk: Chunk): ReadonlyArray<Module>;
|
11
12
|
getChunkModulesIterable(chunk: Chunk): Iterable<Module>;
|
12
13
|
getOrderedChunkModulesIterable(chunk: Chunk, compareFn: (a: Module, b: Module) => number): Iterable<Module>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
package/dist/Compilation.d.ts
CHANGED
@@ -18,7 +18,7 @@ import { ChunkGroup } from "./ChunkGroup";
|
|
18
18
|
import type { Compiler } from "./Compiler";
|
19
19
|
import type { ContextModuleFactory } from "./ContextModuleFactory";
|
20
20
|
import { Entrypoint } from "./Entrypoint";
|
21
|
-
import type {
|
21
|
+
import type { Module } from "./Module";
|
22
22
|
import ModuleGraph from "./ModuleGraph";
|
23
23
|
import type { NormalModuleCompilationHooks } from "./NormalModule";
|
24
24
|
import type { NormalModuleFactory } from "./NormalModuleFactory";
|
@@ -35,6 +35,8 @@ import { StatsPrinter } from "./stats/StatsPrinter";
|
|
35
35
|
import type { InputFileSystem } from "./util/fs";
|
36
36
|
import type Hash from "./util/hash";
|
37
37
|
import "./Chunks";
|
38
|
+
import "./CodeGenerationResults";
|
39
|
+
import type { CodeGenerationResult } from "./taps/compilation";
|
38
40
|
export type Assets = Record<string, Source>;
|
39
41
|
export interface Asset {
|
40
42
|
name: string;
|
@@ -236,6 +238,7 @@ export declare class Compilation {
|
|
236
238
|
*/
|
237
239
|
get namedChunks(): ReadonlyMap<string, Readonly<Chunk>>;
|
238
240
|
get entries(): Map<string, EntryData>;
|
241
|
+
get codeGenerationResults(): binding.CodeGenerationResults;
|
239
242
|
getCache(name: string): import("./lib/CacheFacade").CacheFacade;
|
240
243
|
createStatsOptions(statsValue: StatsValue | undefined, context?: CreateStatsOptionsContext): NormalizedStatsOptions;
|
241
244
|
createStatsFactory(options: StatsOptions): StatsFactory;
|
@@ -315,6 +318,7 @@ export declare class Compilation {
|
|
315
318
|
rebuildModule(module: Module, f: (err: Error | null, module: Module | null) => void): void;
|
316
319
|
addRuntimeModule(chunk: Chunk, runtimeModule: RuntimeModule): void;
|
317
320
|
addInclude(context: string, dependency: ReturnType<typeof EntryPlugin.createDependency>, options: EntryOptions, callback: (err?: null | WebpackError, module?: Module) => void): void;
|
321
|
+
addEntry(context: string, dependency: ReturnType<typeof EntryPlugin.createDependency>, optionsOrName: EntryOptions | string, callback: (err?: null | WebpackError, module?: Module) => void): void;
|
318
322
|
/**
|
319
323
|
* Get the `Source` of a given asset filename.
|
320
324
|
*
|
package/dist/Module.d.ts
CHANGED
@@ -51,10 +51,3 @@ declare module "@rspack/binding" {
|
|
51
51
|
}
|
52
52
|
}
|
53
53
|
export { Module } from "@rspack/binding";
|
54
|
-
export declare class CodeGenerationResult {
|
55
|
-
#private;
|
56
|
-
constructor(result: binding.JsCodegenerationResult);
|
57
|
-
get(sourceType: string): string;
|
58
|
-
}
|
59
|
-
export declare class CodeGenerationResults {
|
60
|
-
}
|
@@ -29,7 +29,7 @@ export declare class SubresourceIntegrityPlugin extends NativeSubresourceIntegri
|
|
29
29
|
private integrities;
|
30
30
|
private options;
|
31
31
|
private validateError;
|
32
|
-
constructor(options
|
32
|
+
constructor(options?: SubresourceIntegrityPluginOptions);
|
33
33
|
private isEnabled;
|
34
34
|
private getIntegrityChecksumForAsset;
|
35
35
|
private handleHwpPluginArgs;
|
package/dist/config/adapter.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import { type RawOptions } from "@rspack/binding";
|
2
2
|
import type { Compiler } from "../Compiler";
|
3
|
-
import { type LoaderContext, type LoaderDefinition, type LoaderDefinitionFunction } from "./adapterRuleUse";
|
3
|
+
import { type LoaderContext, type LoaderDefinition, type LoaderDefinitionFunction, type PitchLoaderDefinitionFunction } from "./adapterRuleUse";
|
4
4
|
import type { RspackOptionsNormalized } from "./normalization";
|
5
5
|
import type { Resolve } from "./types";
|
6
|
-
export type { LoaderContext, LoaderDefinition, LoaderDefinitionFunction };
|
6
|
+
export type { LoaderContext, LoaderDefinition, LoaderDefinitionFunction, PitchLoaderDefinitionFunction };
|
7
7
|
export declare const getRawOptions: (options: RspackOptionsNormalized, compiler: Compiler) => RawOptions;
|
8
8
|
export declare function getRawResolve(resolve: Resolve): RawOptions["resolve"];
|
package/dist/config/types.d.ts
CHANGED
@@ -682,6 +682,7 @@ export type AssetParserOptions = {
|
|
682
682
|
dataUrlCondition?: AssetParserDataUrlOptions;
|
683
683
|
};
|
684
684
|
export type CssParserNamedExports = boolean;
|
685
|
+
export type CssParserUrl = boolean;
|
685
686
|
/** Options object for `css` modules. */
|
686
687
|
export type CssParserOptions = {
|
687
688
|
/**
|
@@ -689,6 +690,11 @@ export type CssParserOptions = {
|
|
689
690
|
* @default true
|
690
691
|
* */
|
691
692
|
namedExports?: CssParserNamedExports;
|
693
|
+
/**
|
694
|
+
* Allow to enable/disables handling the CSS functions url.
|
695
|
+
* @default true
|
696
|
+
* */
|
697
|
+
url?: CssParserUrl;
|
692
698
|
};
|
693
699
|
/** Options object for `css/auto` modules. */
|
694
700
|
export type CssAutoParserOptions = {
|
@@ -697,6 +703,11 @@ export type CssAutoParserOptions = {
|
|
697
703
|
* @default true
|
698
704
|
* */
|
699
705
|
namedExports?: CssParserNamedExports;
|
706
|
+
/**
|
707
|
+
* Allow to enable/disables handling the CSS functions url.
|
708
|
+
* @default true
|
709
|
+
* */
|
710
|
+
url?: CssParserUrl;
|
700
711
|
};
|
701
712
|
/** Options object for `css/module` modules. */
|
702
713
|
export type CssModuleParserOptions = {
|
@@ -705,6 +716,11 @@ export type CssModuleParserOptions = {
|
|
705
716
|
* @default true
|
706
717
|
* */
|
707
718
|
namedExports?: CssParserNamedExports;
|
719
|
+
/**
|
720
|
+
* Allow to enable/disables handling the CSS functions url.
|
721
|
+
* @default true
|
722
|
+
* */
|
723
|
+
url?: CssParserUrl;
|
708
724
|
};
|
709
725
|
type ExportsPresence = "error" | "warn" | "auto" | false;
|
710
726
|
export type JavascriptParserOptions = {
|
@@ -822,6 +838,10 @@ export type AssetGeneratorDataUrl = AssetGeneratorDataUrlOptions | AssetGenerato
|
|
822
838
|
export type AssetInlineGeneratorOptions = {
|
823
839
|
/** Only for modules with module type 'asset' or 'asset/inline'. */
|
824
840
|
dataUrl?: AssetGeneratorDataUrl;
|
841
|
+
/**
|
842
|
+
* Whether or not this asset module should be considered binary. This can be set to 'false' to treat this asset module as text.
|
843
|
+
*/
|
844
|
+
binary?: boolean;
|
825
845
|
};
|
826
846
|
/** Emit the asset in the specified folder relative to 'output.path'. */
|
827
847
|
export type AssetModuleOutputPath = Filename;
|
@@ -852,6 +872,10 @@ export type AssetResourceGeneratorOptions = {
|
|
852
872
|
* @default "url"
|
853
873
|
*/
|
854
874
|
importMode?: AssetModuleImportMode;
|
875
|
+
/**
|
876
|
+
* Whether or not this asset module should be considered binary. This can be set to 'false' to treat this asset module as text.
|
877
|
+
*/
|
878
|
+
binary?: boolean;
|
855
879
|
};
|
856
880
|
/** Generator options for asset modules. */
|
857
881
|
export type AssetGeneratorOptions = AssetInlineGeneratorOptions & AssetResourceGeneratorOptions;
|
package/dist/config/zod.d.ts
CHANGED
@@ -1901,7 +1901,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
1901
1901
|
module: z.ZodOptional<z.ZodObject<{
|
1902
1902
|
defaultRules: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"...">, ZodRspackCrossChecker<t.RuleSetRule>]>, z.ZodUnion<[z.ZodLiteral<false>, z.ZodLiteral<0>, z.ZodLiteral<"">, z.ZodNull, z.ZodUndefined]>]>, "many">>;
|
1903
1903
|
rules: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"...">, ZodRspackCrossChecker<t.RuleSetRule>]>, z.ZodUnion<[z.ZodLiteral<false>, z.ZodLiteral<0>, z.ZodLiteral<"">, z.ZodNull, z.ZodUndefined]>]>, "many">>;
|
1904
|
-
parser: z.ZodOptional<z.
|
1904
|
+
parser: z.ZodOptional<z.ZodObject<{
|
1905
1905
|
asset: z.ZodOptional<z.ZodObject<{
|
1906
1906
|
dataUrlCondition: z.ZodOptional<z.ZodObject<{
|
1907
1907
|
maxSize: z.ZodOptional<z.ZodNumber>;
|
@@ -1921,23 +1921,32 @@ export declare const rspackOptions: z.ZodObject<{
|
|
1921
1921
|
}>>;
|
1922
1922
|
css: z.ZodOptional<z.ZodObject<{
|
1923
1923
|
namedExports: z.ZodOptional<z.ZodBoolean>;
|
1924
|
+
url: z.ZodOptional<z.ZodBoolean>;
|
1924
1925
|
}, "strict", z.ZodTypeAny, {
|
1926
|
+
url?: boolean | undefined;
|
1925
1927
|
namedExports?: boolean | undefined;
|
1926
1928
|
}, {
|
1929
|
+
url?: boolean | undefined;
|
1927
1930
|
namedExports?: boolean | undefined;
|
1928
1931
|
}>>;
|
1929
1932
|
"css/auto": z.ZodOptional<z.ZodObject<{
|
1930
1933
|
namedExports: z.ZodOptional<z.ZodBoolean>;
|
1934
|
+
url: z.ZodOptional<z.ZodBoolean>;
|
1931
1935
|
}, "strict", z.ZodTypeAny, {
|
1936
|
+
url?: boolean | undefined;
|
1932
1937
|
namedExports?: boolean | undefined;
|
1933
1938
|
}, {
|
1939
|
+
url?: boolean | undefined;
|
1934
1940
|
namedExports?: boolean | undefined;
|
1935
1941
|
}>>;
|
1936
1942
|
"css/module": z.ZodOptional<z.ZodObject<{
|
1937
1943
|
namedExports: z.ZodOptional<z.ZodBoolean>;
|
1944
|
+
url: z.ZodOptional<z.ZodBoolean>;
|
1938
1945
|
}, "strict", z.ZodTypeAny, {
|
1946
|
+
url?: boolean | undefined;
|
1939
1947
|
namedExports?: boolean | undefined;
|
1940
1948
|
}, {
|
1949
|
+
url?: boolean | undefined;
|
1941
1950
|
namedExports?: boolean | undefined;
|
1942
1951
|
}>>;
|
1943
1952
|
javascript: z.ZodOptional<z.ZodObject<{
|
@@ -2186,12 +2195,15 @@ export declare const rspackOptions: z.ZodObject<{
|
|
2186
2195
|
}>>;
|
2187
2196
|
}, "strict", z.ZodTypeAny, {
|
2188
2197
|
css?: {
|
2198
|
+
url?: boolean | undefined;
|
2189
2199
|
namedExports?: boolean | undefined;
|
2190
2200
|
} | undefined;
|
2191
2201
|
"css/auto"?: {
|
2202
|
+
url?: boolean | undefined;
|
2192
2203
|
namedExports?: boolean | undefined;
|
2193
2204
|
} | undefined;
|
2194
2205
|
"css/module"?: {
|
2206
|
+
url?: boolean | undefined;
|
2195
2207
|
namedExports?: boolean | undefined;
|
2196
2208
|
} | undefined;
|
2197
2209
|
javascript?: {
|
@@ -2285,12 +2297,15 @@ export declare const rspackOptions: z.ZodObject<{
|
|
2285
2297
|
} | undefined;
|
2286
2298
|
}, {
|
2287
2299
|
css?: {
|
2300
|
+
url?: boolean | undefined;
|
2288
2301
|
namedExports?: boolean | undefined;
|
2289
2302
|
} | undefined;
|
2290
2303
|
"css/auto"?: {
|
2304
|
+
url?: boolean | undefined;
|
2291
2305
|
namedExports?: boolean | undefined;
|
2292
2306
|
} | undefined;
|
2293
2307
|
"css/module"?: {
|
2308
|
+
url?: boolean | undefined;
|
2294
2309
|
namedExports?: boolean | undefined;
|
2295
2310
|
} | undefined;
|
2296
2311
|
javascript?: {
|
@@ -2382,8 +2397,8 @@ export declare const rspackOptions: z.ZodObject<{
|
|
2382
2397
|
requireResolve?: boolean | undefined;
|
2383
2398
|
importDynamic?: boolean | undefined;
|
2384
2399
|
} | undefined;
|
2385
|
-
}
|
2386
|
-
generator: z.ZodOptional<z.
|
2400
|
+
}>>;
|
2401
|
+
generator: z.ZodOptional<z.ZodObject<{
|
2387
2402
|
asset: z.ZodOptional<z.ZodObject<{
|
2388
2403
|
dataUrl: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
2389
2404
|
encoding: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodLiteral<"base64">]>>;
|
@@ -2408,7 +2423,9 @@ export declare const rspackOptions: z.ZodObject<{
|
|
2408
2423
|
emit: z.ZodOptional<z.ZodBoolean>;
|
2409
2424
|
filename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
|
2410
2425
|
publicPath: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>]>>;
|
2426
|
+
outputPath: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
|
2411
2427
|
}, "strict", z.ZodTypeAny, {
|
2428
|
+
outputPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2412
2429
|
emit?: boolean | undefined;
|
2413
2430
|
publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2414
2431
|
filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
@@ -2420,6 +2437,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
2420
2437
|
filename: string;
|
2421
2438
|
}, ...args: unknown[]) => string) | undefined;
|
2422
2439
|
}, {
|
2440
|
+
outputPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2423
2441
|
emit?: boolean | undefined;
|
2424
2442
|
publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2425
2443
|
filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
@@ -2472,11 +2490,14 @@ export declare const rspackOptions: z.ZodObject<{
|
|
2472
2490
|
emit: z.ZodOptional<z.ZodBoolean>;
|
2473
2491
|
filename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
|
2474
2492
|
publicPath: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>]>>;
|
2493
|
+
outputPath: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
|
2475
2494
|
}, "strict", z.ZodTypeAny, {
|
2495
|
+
outputPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2476
2496
|
emit?: boolean | undefined;
|
2477
2497
|
publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2478
2498
|
filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2479
2499
|
}, {
|
2500
|
+
outputPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2480
2501
|
emit?: boolean | undefined;
|
2481
2502
|
publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2482
2503
|
filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
@@ -2548,6 +2569,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
2548
2569
|
localIdentName?: string | undefined;
|
2549
2570
|
} | undefined;
|
2550
2571
|
asset?: {
|
2572
|
+
outputPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2551
2573
|
emit?: boolean | undefined;
|
2552
2574
|
publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2553
2575
|
filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
@@ -2572,6 +2594,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
2572
2594
|
}, ...args: unknown[]) => string) | undefined;
|
2573
2595
|
} | undefined;
|
2574
2596
|
"asset/resource"?: {
|
2597
|
+
outputPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2575
2598
|
emit?: boolean | undefined;
|
2576
2599
|
publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2577
2600
|
filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
@@ -2594,6 +2617,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
2594
2617
|
localIdentName?: string | undefined;
|
2595
2618
|
} | undefined;
|
2596
2619
|
asset?: {
|
2620
|
+
outputPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2597
2621
|
emit?: boolean | undefined;
|
2598
2622
|
publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2599
2623
|
filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
@@ -2618,21 +2642,25 @@ export declare const rspackOptions: z.ZodObject<{
|
|
2618
2642
|
}, ...args: unknown[]) => string) | undefined;
|
2619
2643
|
} | undefined;
|
2620
2644
|
"asset/resource"?: {
|
2645
|
+
outputPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2621
2646
|
emit?: boolean | undefined;
|
2622
2647
|
publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2623
2648
|
filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2624
2649
|
} | undefined;
|
2625
|
-
}
|
2650
|
+
}>>;
|
2626
2651
|
noParse: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodBoolean>]>, z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodBoolean>]>, "many">]>>;
|
2627
2652
|
}, "strict", z.ZodTypeAny, {
|
2628
2653
|
parser?: {
|
2629
2654
|
css?: {
|
2655
|
+
url?: boolean | undefined;
|
2630
2656
|
namedExports?: boolean | undefined;
|
2631
2657
|
} | undefined;
|
2632
2658
|
"css/auto"?: {
|
2659
|
+
url?: boolean | undefined;
|
2633
2660
|
namedExports?: boolean | undefined;
|
2634
2661
|
} | undefined;
|
2635
2662
|
"css/module"?: {
|
2663
|
+
url?: boolean | undefined;
|
2636
2664
|
namedExports?: boolean | undefined;
|
2637
2665
|
} | undefined;
|
2638
2666
|
javascript?: {
|
@@ -2724,8 +2752,8 @@ export declare const rspackOptions: z.ZodObject<{
|
|
2724
2752
|
requireResolve?: boolean | undefined;
|
2725
2753
|
importDynamic?: boolean | undefined;
|
2726
2754
|
} | undefined;
|
2727
|
-
} |
|
2728
|
-
generator?:
|
2755
|
+
} | undefined;
|
2756
|
+
generator?: {
|
2729
2757
|
css?: {
|
2730
2758
|
exportsOnly?: boolean | undefined;
|
2731
2759
|
esModule?: boolean | undefined;
|
@@ -2743,6 +2771,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
2743
2771
|
localIdentName?: string | undefined;
|
2744
2772
|
} | undefined;
|
2745
2773
|
asset?: {
|
2774
|
+
outputPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2746
2775
|
emit?: boolean | undefined;
|
2747
2776
|
publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2748
2777
|
filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
@@ -2767,6 +2796,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
2767
2796
|
}, ...args: unknown[]) => string) | undefined;
|
2768
2797
|
} | undefined;
|
2769
2798
|
"asset/resource"?: {
|
2799
|
+
outputPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2770
2800
|
emit?: boolean | undefined;
|
2771
2801
|
publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2772
2802
|
filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
@@ -2778,12 +2808,15 @@ export declare const rspackOptions: z.ZodObject<{
|
|
2778
2808
|
}, {
|
2779
2809
|
parser?: {
|
2780
2810
|
css?: {
|
2811
|
+
url?: boolean | undefined;
|
2781
2812
|
namedExports?: boolean | undefined;
|
2782
2813
|
} | undefined;
|
2783
2814
|
"css/auto"?: {
|
2815
|
+
url?: boolean | undefined;
|
2784
2816
|
namedExports?: boolean | undefined;
|
2785
2817
|
} | undefined;
|
2786
2818
|
"css/module"?: {
|
2819
|
+
url?: boolean | undefined;
|
2787
2820
|
namedExports?: boolean | undefined;
|
2788
2821
|
} | undefined;
|
2789
2822
|
javascript?: {
|
@@ -2875,8 +2908,8 @@ export declare const rspackOptions: z.ZodObject<{
|
|
2875
2908
|
requireResolve?: boolean | undefined;
|
2876
2909
|
importDynamic?: boolean | undefined;
|
2877
2910
|
} | undefined;
|
2878
|
-
} |
|
2879
|
-
generator?:
|
2911
|
+
} | undefined;
|
2912
|
+
generator?: {
|
2880
2913
|
css?: {
|
2881
2914
|
exportsOnly?: boolean | undefined;
|
2882
2915
|
esModule?: boolean | undefined;
|
@@ -2894,6 +2927,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
2894
2927
|
localIdentName?: string | undefined;
|
2895
2928
|
} | undefined;
|
2896
2929
|
asset?: {
|
2930
|
+
outputPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2897
2931
|
emit?: boolean | undefined;
|
2898
2932
|
publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2899
2933
|
filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
@@ -2918,6 +2952,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
2918
2952
|
}, ...args: unknown[]) => string) | undefined;
|
2919
2953
|
} | undefined;
|
2920
2954
|
"asset/resource"?: {
|
2955
|
+
outputPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2921
2956
|
emit?: boolean | undefined;
|
2922
2957
|
publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
2923
2958
|
filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
@@ -2951,12 +2986,15 @@ export declare const rspackOptions: z.ZodObject<{
|
|
2951
2986
|
module?: {
|
2952
2987
|
parser?: {
|
2953
2988
|
css?: {
|
2989
|
+
url?: boolean | undefined;
|
2954
2990
|
namedExports?: boolean | undefined;
|
2955
2991
|
} | undefined;
|
2956
2992
|
"css/auto"?: {
|
2993
|
+
url?: boolean | undefined;
|
2957
2994
|
namedExports?: boolean | undefined;
|
2958
2995
|
} | undefined;
|
2959
2996
|
"css/module"?: {
|
2997
|
+
url?: boolean | undefined;
|
2960
2998
|
namedExports?: boolean | undefined;
|
2961
2999
|
} | undefined;
|
2962
3000
|
javascript?: {
|
@@ -3048,8 +3086,8 @@ export declare const rspackOptions: z.ZodObject<{
|
|
3048
3086
|
requireResolve?: boolean | undefined;
|
3049
3087
|
importDynamic?: boolean | undefined;
|
3050
3088
|
} | undefined;
|
3051
|
-
} |
|
3052
|
-
generator?:
|
3089
|
+
} | undefined;
|
3090
|
+
generator?: {
|
3053
3091
|
css?: {
|
3054
3092
|
exportsOnly?: boolean | undefined;
|
3055
3093
|
esModule?: boolean | undefined;
|
@@ -3067,6 +3105,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
3067
3105
|
localIdentName?: string | undefined;
|
3068
3106
|
} | undefined;
|
3069
3107
|
asset?: {
|
3108
|
+
outputPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
3070
3109
|
emit?: boolean | undefined;
|
3071
3110
|
publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
3072
3111
|
filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
@@ -3091,6 +3130,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
3091
3130
|
}, ...args: unknown[]) => string) | undefined;
|
3092
3131
|
} | undefined;
|
3093
3132
|
"asset/resource"?: {
|
3133
|
+
outputPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
3094
3134
|
emit?: boolean | undefined;
|
3095
3135
|
publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
3096
3136
|
filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
@@ -3568,12 +3608,15 @@ export declare const rspackOptions: z.ZodObject<{
|
|
3568
3608
|
module?: {
|
3569
3609
|
parser?: {
|
3570
3610
|
css?: {
|
3611
|
+
url?: boolean | undefined;
|
3571
3612
|
namedExports?: boolean | undefined;
|
3572
3613
|
} | undefined;
|
3573
3614
|
"css/auto"?: {
|
3615
|
+
url?: boolean | undefined;
|
3574
3616
|
namedExports?: boolean | undefined;
|
3575
3617
|
} | undefined;
|
3576
3618
|
"css/module"?: {
|
3619
|
+
url?: boolean | undefined;
|
3577
3620
|
namedExports?: boolean | undefined;
|
3578
3621
|
} | undefined;
|
3579
3622
|
javascript?: {
|
@@ -3665,8 +3708,8 @@ export declare const rspackOptions: z.ZodObject<{
|
|
3665
3708
|
requireResolve?: boolean | undefined;
|
3666
3709
|
importDynamic?: boolean | undefined;
|
3667
3710
|
} | undefined;
|
3668
|
-
} |
|
3669
|
-
generator?:
|
3711
|
+
} | undefined;
|
3712
|
+
generator?: {
|
3670
3713
|
css?: {
|
3671
3714
|
exportsOnly?: boolean | undefined;
|
3672
3715
|
esModule?: boolean | undefined;
|
@@ -3684,6 +3727,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
3684
3727
|
localIdentName?: string | undefined;
|
3685
3728
|
} | undefined;
|
3686
3729
|
asset?: {
|
3730
|
+
outputPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
3687
3731
|
emit?: boolean | undefined;
|
3688
3732
|
publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
3689
3733
|
filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
@@ -3708,6 +3752,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
3708
3752
|
}, ...args: unknown[]) => string) | undefined;
|
3709
3753
|
} | undefined;
|
3710
3754
|
"asset/resource"?: {
|
3755
|
+
outputPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
3711
3756
|
emit?: boolean | undefined;
|
3712
3757
|
publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
3713
3758
|
filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
|
package/dist/index.js
CHANGED
@@ -238,6 +238,11 @@ var __webpack_modules__ = {
|
|
238
238
|
module.exports = import("../compiled/tinypool/dist/index.js").then(function(module) {
|
239
239
|
return module;
|
240
240
|
});
|
241
|
+
},
|
242
|
+
"node:inspector": function(module) {
|
243
|
+
module.exports = import("node:inspector").then(function(module) {
|
244
|
+
return module;
|
245
|
+
});
|
241
246
|
}
|
242
247
|
}, __webpack_module_cache__ = {};
|
243
248
|
function __webpack_require__(moduleId) {
|
@@ -589,6 +594,9 @@ for(var __webpack_i__ in (()=>{
|
|
589
594
|
constructor(binding){
|
590
595
|
this.#inner = binding;
|
591
596
|
}
|
597
|
+
hasChunkEntryDependentChunks(chunk) {
|
598
|
+
return this.#inner.hasChunkEntryDependentChunks(Chunk.__to_binding(chunk));
|
599
|
+
}
|
592
600
|
getChunkModules(chunk) {
|
593
601
|
return this.#inner.getChunkModules(Chunk.__to_binding(chunk));
|
594
602
|
}
|
@@ -1520,6 +1528,13 @@ for(var __webpack_i__ in (()=>{
|
|
1520
1528
|
value (value) {
|
1521
1529
|
return this._has(Chunk.__to_binding(value));
|
1522
1530
|
}
|
1531
|
+
}), Object.defineProperty(binding_.Sources.prototype, "get", {
|
1532
|
+
enumerable: !0,
|
1533
|
+
configurable: !0,
|
1534
|
+
value (sourceType) {
|
1535
|
+
let originalSource = this._get(sourceType);
|
1536
|
+
return originalSource ? JsSource.__from_binding(originalSource) : null;
|
1537
|
+
}
|
1523
1538
|
});
|
1524
1539
|
let checkCompilation = (compilation)=>{
|
1525
1540
|
if (!(compilation instanceof Compilation)) throw TypeError('The \'compilation\' argument must be an instance of Compilation. This usually occurs when multiple versions of "@rspack/core" are used, or when the code in "@rspack/core" is executed multiple times.');
|
@@ -1547,6 +1562,7 @@ for(var __webpack_i__ in (()=>{
|
|
1547
1562
|
};
|
1548
1563
|
needAdditionalPass;
|
1549
1564
|
#addIncludeDispatcher;
|
1565
|
+
#addEntryDispatcher;
|
1550
1566
|
[Compilation_computedKey];
|
1551
1567
|
constructor(compiler, inner){
|
1552
1568
|
this.#inner = inner, this.#shutdown = !1;
|
@@ -1668,7 +1684,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
1668
1684
|
seal: new lite_tapable_namespaceObject.SyncHook([]),
|
1669
1685
|
afterSeal: new lite_tapable_namespaceObject.AsyncSeriesHook([]),
|
1670
1686
|
needAdditionalPass: new lite_tapable_namespaceObject.SyncBailHook([])
|
1671
|
-
}, this.compiler = compiler, this.resolverFactory = compiler.resolverFactory, this.inputFileSystem = compiler.inputFileSystem, this.options = compiler.options, this.outputOptions = compiler.options.output, this.logging = new Map(), this.childrenCounters = {}, this.children = [], this.needAdditionalPass = !1, this.chunkGraph = ChunkGraph.__from_binding(inner.chunkGraph), this.moduleGraph = ModuleGraph.__from_binding(inner.moduleGraph), this.#addIncludeDispatcher = new
|
1687
|
+
}, this.compiler = compiler, this.resolverFactory = compiler.resolverFactory, this.inputFileSystem = compiler.inputFileSystem, this.options = compiler.options, this.outputOptions = compiler.options.output, this.logging = new Map(), this.childrenCounters = {}, this.children = [], this.needAdditionalPass = !1, this.chunkGraph = ChunkGraph.__from_binding(inner.chunkGraph), this.moduleGraph = ModuleGraph.__from_binding(inner.moduleGraph), this.#addIncludeDispatcher = new AddEntryItemDispatcher(inner.addInclude.bind(inner)), this.#addEntryDispatcher = new AddEntryItemDispatcher(inner.addEntry.bind(inner)), this[binding_.COMPILATION_HOOKS_MAP_SYMBOL] = new WeakMap();
|
1672
1688
|
}
|
1673
1689
|
get hash() {
|
1674
1690
|
return this.#inner.hash;
|
@@ -1725,6 +1741,9 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
1725
1741
|
get entries() {
|
1726
1742
|
return new Entries(this.#inner.entries);
|
1727
1743
|
}
|
1744
|
+
get codeGenerationResults() {
|
1745
|
+
return this.#inner.codeGenerationResults;
|
1746
|
+
}
|
1728
1747
|
#createCachedAssets() {
|
1729
1748
|
return new Proxy({}, {
|
1730
1749
|
get: (_, property)=>{
|
@@ -1994,6 +2013,11 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
1994
2013
|
addInclude(context, dependency, options, callback) {
|
1995
2014
|
this.#addIncludeDispatcher.call(context, dependency, options, callback);
|
1996
2015
|
}
|
2016
|
+
addEntry(context, dependency, optionsOrName, callback) {
|
2017
|
+
this.#addEntryDispatcher.call(context, dependency, "object" == typeof optionsOrName ? optionsOrName : {
|
2018
|
+
name: optionsOrName
|
2019
|
+
}, callback);
|
2020
|
+
}
|
1997
2021
|
__internal__getAssetSource(filename) {
|
1998
2022
|
let rawSource = this.#inner.getAssetSource(filename);
|
1999
2023
|
if (rawSource) return JsSource.__from_binding(rawSource);
|
@@ -2038,7 +2062,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2038
2062
|
static PROCESS_ASSETS_STAGE_ANALYSE = 4000;
|
2039
2063
|
static PROCESS_ASSETS_STAGE_REPORT = 5000;
|
2040
2064
|
}
|
2041
|
-
class
|
2065
|
+
class AddEntryItemDispatcher {
|
2042
2066
|
#inner;
|
2043
2067
|
#running;
|
2044
2068
|
#args = [];
|
@@ -2139,7 +2163,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2139
2163
|
compiler.hooks.thisCompilation.tap("executeModule", (compilation)=>{
|
2140
2164
|
compiler.__internal__get_module_execution_results_map().clear(), compilation.hooks.executeModule.tap("executeModule", (options, context)=>{
|
2141
2165
|
let moduleObject = options.moduleObject, source = options.codeGenerationResult.get("javascript");
|
2142
|
-
try {
|
2166
|
+
if (void 0 !== source) try {
|
2143
2167
|
external_node_vm_default().runInThisContext(`(function(module, __webpack_module__, __webpack_exports__, exports, ${RuntimeGlobals.require}) {\n${source}\n})`, {
|
2144
2168
|
filename: moduleObject.id
|
2145
2169
|
}).call(moduleObject.exports, moduleObject, moduleObject, moduleObject.exports, moduleObject.exports, context.__webpack_require__);
|
@@ -3061,16 +3085,15 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3061
3085
|
});
|
3062
3086
|
let external_node_fs_namespaceObject = require("node:fs");
|
3063
3087
|
var external_node_fs_default = __webpack_require__.n(external_node_fs_namespaceObject);
|
3064
|
-
let external_node_inspector_namespaceObject = require("node:inspector");
|
3065
|
-
var external_node_inspector_default = __webpack_require__.n(external_node_inspector_namespaceObject);
|
3066
3088
|
class JavaScriptTracer {
|
3067
3089
|
static startTime;
|
3068
3090
|
static events;
|
3069
3091
|
static layer;
|
3070
3092
|
static output;
|
3071
3093
|
static session;
|
3072
|
-
static initJavaScriptTrace(layer, output) {
|
3073
|
-
|
3094
|
+
static async initJavaScriptTrace(layer, output) {
|
3095
|
+
let { Session } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "node:inspector"));
|
3096
|
+
this.session = new Session(), this.layer = layer, this.output = output, this.events = [];
|
3074
3097
|
let hrtime = process.hrtime();
|
3075
3098
|
this.startTime = 1000000 * hrtime[0] + Math.round(hrtime[1] / 1000);
|
3076
3099
|
}
|
@@ -4193,7 +4216,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
4193
4216
|
}
|
4194
4217
|
function getRawCssParserOptions(parser) {
|
4195
4218
|
return {
|
4196
|
-
namedExports: parser.namedExports
|
4219
|
+
namedExports: parser.namedExports,
|
4220
|
+
url: parser.url
|
4197
4221
|
};
|
4198
4222
|
}
|
4199
4223
|
function getRawGeneratorOptions(generator, type) {
|
@@ -4257,7 +4281,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
4257
4281
|
};
|
4258
4282
|
if ("function" == typeof dataUrl && null !== dataUrl) return (source, context)=>dataUrl(source, context);
|
4259
4283
|
throw Error(`unreachable: AssetGeneratorDataUrl type should be one of "options", "function", but got ${dataUrl}`);
|
4260
|
-
}(options.dataUrl) : void 0
|
4284
|
+
}(options.dataUrl) : void 0,
|
4285
|
+
binary: options.binary
|
4261
4286
|
};
|
4262
4287
|
}
|
4263
4288
|
function getRawAssetResourceGeneratorOptions(options) {
|
@@ -4266,7 +4291,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
4266
4291
|
filename: options.filename,
|
4267
4292
|
outputPath: options.outputPath,
|
4268
4293
|
publicPath: options.publicPath,
|
4269
|
-
importMode: options.importMode
|
4294
|
+
importMode: options.importMode,
|
4295
|
+
binary: options.binary
|
4270
4296
|
};
|
4271
4297
|
}
|
4272
4298
|
function getRawCssAutoOrModuleGeneratorOptions(options) {
|
@@ -5516,7 +5542,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
5516
5542
|
integrities = new Map();
|
5517
5543
|
options;
|
5518
5544
|
validateError = null;
|
5519
|
-
constructor(options){
|
5545
|
+
constructor(options = {}){
|
5520
5546
|
let validateError = null;
|
5521
5547
|
if ("object" != typeof options) throw Error("SubResourceIntegrity: argument must be an object");
|
5522
5548
|
try {
|
@@ -6500,7 +6526,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
6500
6526
|
}, applyExperimentsDefaults = (experiments, { production, development })=>{
|
6501
6527
|
F(experiments, "cache", ()=>development), D(experiments, "futureDefaults", !1), D(experiments, "lazyCompilation", !1), D(experiments, "asyncWebAssembly", experiments.futureDefaults), D(experiments, "css", !!experiments.futureDefaults || void 0), D(experiments, "layers", !1), D(experiments, "topLevelAwait", !0), D(experiments, "buildHttp", void 0), experiments.buildHttp && "object" == typeof experiments.buildHttp && D(experiments.buildHttp, "upgrade", !1), D(experiments, "incremental", {}), "object" == typeof experiments.incremental && (D(experiments.incremental, "silent", !0), D(experiments.incremental, "make", !0), D(experiments.incremental, "inferAsyncModules", !1), D(experiments.incremental, "providedExports", !1), D(experiments.incremental, "dependenciesDiagnostics", !1), D(experiments.incremental, "sideEffects", !1), D(experiments.incremental, "buildChunkGraph", !1), D(experiments.incremental, "moduleIds", !1), D(experiments.incremental, "chunkIds", !1), D(experiments.incremental, "modulesHashes", !1), D(experiments.incremental, "modulesCodegen", !1), D(experiments.incremental, "modulesRuntimeRequirements", !1), D(experiments.incremental, "chunksRuntimeRequirements", !1), D(experiments.incremental, "chunksHashes", !1), D(experiments.incremental, "chunksRender", !1), D(experiments.incremental, "emitAssets", !0)), D(experiments, "rspackFuture", {}), D(experiments, "parallelCodeSplitting", !0), D(experiments, "parallelLoader", !1);
|
6502
6528
|
}, applybundlerInfoDefaults = (rspackFuture, library)=>{
|
6503
|
-
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.3.
|
6529
|
+
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.3.10"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
|
6504
6530
|
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyJavascriptParserOptionsDefaults = (parserOptions)=>{
|
6505
6531
|
D(parserOptions, "dynamicImportMode", "lazy"), D(parserOptions, "dynamicImportPrefetch", !1), D(parserOptions, "dynamicImportPreload", !1), D(parserOptions, "url", !0), D(parserOptions, "exprContextCritical", !0), D(parserOptions, "wrappedContextCritical", !1), D(parserOptions, "wrappedContextRegExp", /.*/), D(parserOptions, "strictExportPresence", !1), D(parserOptions, "requireAsExpression", !0), D(parserOptions, "requireDynamic", !0), D(parserOptions, "requireResolve", !0), D(parserOptions, "importDynamic", !0), D(parserOptions, "worker", [
|
6506
6532
|
"..."
|
@@ -6508,7 +6534,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
6508
6534
|
}, applyJsonGeneratorOptionsDefaults = (generatorOptions)=>{
|
6509
6535
|
D(generatorOptions, "JSONParse", !0);
|
6510
6536
|
}, applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties, mode })=>{
|
6511
|
-
assertNotNill(module.parser), assertNotNill(module.generator), F(module.parser, "asset", ()=>({})), assertNotNill(module.parser.asset), F(module.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module.parser.asset.dataUrlCondition && D(module.parser.asset.dataUrlCondition, "maxSize", 8096), F(module.parser, "javascript", ()=>({})), assertNotNill(module.parser.javascript), applyJavascriptParserOptionsDefaults(module.parser.javascript), F(module.parser, JSON_MODULE_TYPE, ()=>({})), assertNotNill(module.parser[JSON_MODULE_TYPE]), D(module.parser[JSON_MODULE_TYPE], "exportsDepth", "development" === mode ? 1 : Number.MAX_SAFE_INTEGER), F(module.generator, "json", ()=>({})), assertNotNill(module.generator.json), applyJsonGeneratorOptionsDefaults(module.generator.json), css && (F(module.parser, "css", ()=>({})), assertNotNill(module.parser.css), D(module.parser.css, "namedExports", !0), F(module.parser, "css/auto", ()=>({})), assertNotNill(module.parser["css/auto"]), D(module.parser["css/auto"], "namedExports", !0), F(module.parser, "css/module", ()=>({})), assertNotNill(module.parser["css/module"]), D(module.parser["css/module"], "namedExports", !0), F(module.generator, "css", ()=>({})), assertNotNill(module.generator.css), D(module.generator.css, "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator.css, "esModule", !0), F(module.generator, "css/auto", ()=>({})), assertNotNill(module.generator["css/auto"]), D(module.generator["css/auto"], "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator["css/auto"], "exportsConvention", "as-is"), D(module.generator["css/auto"], "localIdentName", "[uniqueName]-[id]-[local]"), D(module.generator["css/auto"], "esModule", !0), F(module.generator, "css/module", ()=>({})), assertNotNill(module.generator["css/module"]), D(module.generator["css/module"], "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator["css/module"], "exportsConvention", "as-is"), D(module.generator["css/module"], "localIdentName", "[uniqueName]-[id]-[local]"), D(module.generator["css/module"], "esModule", !0)), A(module, "defaultRules", ()=>{
|
6537
|
+
assertNotNill(module.parser), assertNotNill(module.generator), F(module.parser, "asset", ()=>({})), assertNotNill(module.parser.asset), F(module.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module.parser.asset.dataUrlCondition && D(module.parser.asset.dataUrlCondition, "maxSize", 8096), F(module.parser, "javascript", ()=>({})), assertNotNill(module.parser.javascript), applyJavascriptParserOptionsDefaults(module.parser.javascript), F(module.parser, JSON_MODULE_TYPE, ()=>({})), assertNotNill(module.parser[JSON_MODULE_TYPE]), D(module.parser[JSON_MODULE_TYPE], "exportsDepth", "development" === mode ? 1 : Number.MAX_SAFE_INTEGER), F(module.generator, "json", ()=>({})), assertNotNill(module.generator.json), applyJsonGeneratorOptionsDefaults(module.generator.json), css && (F(module.parser, "css", ()=>({})), assertNotNill(module.parser.css), D(module.parser.css, "namedExports", !0), D(module.parser.css, "url", !0), F(module.parser, "css/auto", ()=>({})), assertNotNill(module.parser["css/auto"]), D(module.parser["css/auto"], "namedExports", !0), D(module.parser["css/auto"], "url", !0), F(module.parser, "css/module", ()=>({})), assertNotNill(module.parser["css/module"]), D(module.parser["css/module"], "namedExports", !0), D(module.parser["css/module"], "url", !0), F(module.generator, "css", ()=>({})), assertNotNill(module.generator.css), D(module.generator.css, "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator.css, "esModule", !0), F(module.generator, "css/auto", ()=>({})), assertNotNill(module.generator["css/auto"]), D(module.generator["css/auto"], "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator["css/auto"], "exportsConvention", "as-is"), D(module.generator["css/auto"], "localIdentName", "[uniqueName]-[id]-[local]"), D(module.generator["css/auto"], "esModule", !0), F(module.generator, "css/module", ()=>({})), assertNotNill(module.generator["css/module"]), D(module.generator["css/module"], "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator["css/module"], "exportsConvention", "as-is"), D(module.generator["css/module"], "localIdentName", "[uniqueName]-[id]-[local]"), D(module.generator["css/module"], "esModule", !0)), A(module, "defaultRules", ()=>{
|
6512
6538
|
let esm = {
|
6513
6539
|
type: "javascript/esm",
|
6514
6540
|
resolve: {
|
@@ -6642,7 +6668,9 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
6642
6668
|
if ("ENOENT" !== err.code) throw err.message += `\nwhile determining default 'output.uniqueName' from 'name' in ${pkgPath}`, err;
|
6643
6669
|
return "";
|
6644
6670
|
}
|
6645
|
-
}), F(output, "devtoolNamespace", ()=>output.uniqueName), F(output, "module", ()=>!!outputModule)
|
6671
|
+
}), F(output, "devtoolNamespace", ()=>output.uniqueName), F(output, "module", ()=>!!outputModule);
|
6672
|
+
let environment = output.environment, optimistic = (v)=>v || void 0 === v, conditionallyOptimistic = (v, c)=>void 0 === v && c || v;
|
6673
|
+
F(environment, "globalThis", ()=>tp?.globalThis), F(environment, "bigIntLiteral", ()=>tp && optimistic(tp.bigIntLiteral)), F(environment, "const", ()=>tp && optimistic(tp.const)), F(environment, "arrowFunction", ()=>tp && optimistic(tp.arrowFunction)), F(environment, "asyncFunction", ()=>tp && optimistic(tp.asyncFunction)), F(environment, "forOf", ()=>tp && optimistic(tp.forOf)), F(environment, "destructuring", ()=>tp && optimistic(tp.destructuring)), F(environment, "optionalChaining", ()=>tp && optimistic(tp.optionalChaining)), F(environment, "nodePrefixForCoreModules", ()=>tp && optimistic(tp.nodePrefixForCoreModules)), F(environment, "templateLiteral", ()=>tp && optimistic(tp.templateLiteral)), F(environment, "dynamicImport", ()=>conditionallyOptimistic(tp?.dynamicImport, output.module)), F(environment, "dynamicImportInWorker", ()=>conditionallyOptimistic(tp?.dynamicImportInWorker, output.module)), F(environment, "module", ()=>conditionallyOptimistic(tp?.module, output.module)), F(environment, "document", ()=>tp && optimistic(tp.document)), D(output, "filename", output.module ? "[name].mjs" : "[name].js"), F(output, "iife", ()=>!output.module), F(output, "chunkFilename", ()=>{
|
6646
6674
|
let filename = output.filename;
|
6647
6675
|
if ("function" != typeof filename) {
|
6648
6676
|
let hasName = filename.includes("[name]"), hasId = filename.includes("[id]"), hasChunkHash = filename.includes("[chunkhash]"), hasContentHash = filename.includes("[contenthash]");
|
@@ -6661,7 +6689,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
6661
6689
|
if (tp) {
|
6662
6690
|
let helpMessage = isAffectedByBrowserslist ? "Make sure that your 'browserslist' includes only platforms that support these features or select an appropriate 'target' to allow selecting a chunk format by default. Alternatively specify the 'output.chunkFormat' directly." : "Select an appropriate 'target' to allow selecting one by default, or specify the 'output.chunkFormat' directly.";
|
6663
6691
|
if (output.module) {
|
6664
|
-
if (
|
6692
|
+
if (environment.dynamicImport) return "module";
|
6665
6693
|
if (tp.document) return "array-push";
|
6666
6694
|
throw Error(`For the selected environment is no default ESM chunk format available:\nESM exports can be chosen when 'import()' is available.\nJSONP Array push can be chosen when 'document' is available.\n${helpMessage}`);
|
6667
6695
|
}
|
@@ -6683,9 +6711,9 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
6683
6711
|
if (tp.nodeBuiltins) return "async-node";
|
6684
6712
|
break;
|
6685
6713
|
case "module":
|
6686
|
-
if (
|
6714
|
+
if (environment.dynamicImport) return "import";
|
6687
6715
|
}
|
6688
|
-
if (null === tp.require || null === tp.nodeBuiltins || null === tp.document || null === tp.importScripts) return "universal";
|
6716
|
+
if ((null === tp.require || null === tp.nodeBuiltins || null === tp.document || null === tp.importScripts) && output.module && environment.dynamicImport) return "universal";
|
6689
6717
|
}
|
6690
6718
|
return !1;
|
6691
6719
|
}), F(output, "workerChunkLoading", ()=>{
|
@@ -6699,9 +6727,9 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
6699
6727
|
if (tp.nodeBuiltins) return "async-node";
|
6700
6728
|
break;
|
6701
6729
|
case "module":
|
6702
|
-
if (
|
6730
|
+
if (environment.dynamicImportInWorker) return "import";
|
6703
6731
|
}
|
6704
|
-
if (null === tp.require || null === tp.nodeBuiltins || null === tp.importScriptsInWorker) return "universal";
|
6732
|
+
if ((null === tp.require || null === tp.nodeBuiltins || null === tp.importScriptsInWorker) && output.module && environment.dynamicImport) return "universal";
|
6705
6733
|
}
|
6706
6734
|
return !1;
|
6707
6735
|
}), F(output, "wasmLoading", ()=>{
|
@@ -6737,8 +6765,6 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
6737
6765
|
let enabledWasmLoadingTypes = new Set();
|
6738
6766
|
return output.wasmLoading && enabledWasmLoadingTypes.add(output.wasmLoading), output.workerWasmLoading && enabledWasmLoadingTypes.add(output.workerWasmLoading), Array.from(enabledWasmLoadingTypes);
|
6739
6767
|
});
|
6740
|
-
let environment = output.environment, optimistic = (v)=>v || void 0 === v, conditionallyOptimistic = (v, c)=>void 0 === v && c || v;
|
6741
|
-
F(environment, "globalThis", ()=>tp?.globalThis), F(environment, "bigIntLiteral", ()=>tp && optimistic(tp.bigIntLiteral)), F(environment, "const", ()=>tp && optimistic(tp.const)), F(environment, "arrowFunction", ()=>tp && optimistic(tp.arrowFunction)), F(environment, "asyncFunction", ()=>tp && optimistic(tp.asyncFunction)), F(environment, "forOf", ()=>tp && optimistic(tp.forOf)), F(environment, "destructuring", ()=>tp && optimistic(tp.destructuring)), F(environment, "optionalChaining", ()=>tp && optimistic(tp.optionalChaining)), F(environment, "nodePrefixForCoreModules", ()=>tp && optimistic(tp.nodePrefixForCoreModules)), F(environment, "templateLiteral", ()=>tp && optimistic(tp.templateLiteral)), F(environment, "dynamicImport", ()=>conditionallyOptimistic(tp?.dynamicImport, output.module)), F(environment, "dynamicImportInWorker", ()=>conditionallyOptimistic(tp?.dynamicImportInWorker, output.module)), F(environment, "module", ()=>conditionallyOptimistic(tp?.module, output.module)), F(environment, "document", ()=>tp && optimistic(tp.document));
|
6742
6768
|
}, applyExternalsPresetsDefaults = (externalsPresets, { targetProperties, buildHttp })=>{
|
6743
6769
|
D(externalsPresets, "web", !buildHttp && targetProperties?.web), D(externalsPresets, "node", targetProperties?.node), D(externalsPresets, "electron", targetProperties?.electron), D(externalsPresets, "electronMain", targetProperties?.electron && targetProperties.electronMain), D(externalsPresets, "electronPreload", targetProperties?.electron && targetProperties.electronPreload), D(externalsPresets, "electronRenderer", targetProperties?.electron && targetProperties.electronRenderer), D(externalsPresets, "nwjs", targetProperties?.nwjs);
|
6744
6770
|
}, applyLoaderDefaults = (loader, { targetProperties, environment })=>{
|
@@ -7403,7 +7429,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
7403
7429
|
},
|
7404
7430
|
arm: "gnueabihf"
|
7405
7431
|
}
|
7406
|
-
}, BINDING_VERSION = __webpack_require__("@rspack/binding/package.json").version, CORE_VERSION = "1.3.
|
7432
|
+
}, BINDING_VERSION = __webpack_require__("@rspack/binding/package.json").version, CORE_VERSION = "1.3.10", getAddonPlatformArchAbi = ()=>{
|
7407
7433
|
let { platform, arch } = process, binding = "";
|
7408
7434
|
binding += platform;
|
7409
7435
|
let abi = NodePlatformArchToAbi[platform][arch];
|
@@ -7537,136 +7563,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
7537
7563
|
};
|
7538
7564
|
})
|
7539
7565
|
};
|
7540
|
-
};
|
7541
|
-
class ContextModuleFactoryBeforeResolveData {
|
7542
|
-
#inner;
|
7543
|
-
static __from_binding(binding) {
|
7544
|
-
return new ContextModuleFactoryBeforeResolveData(binding);
|
7545
|
-
}
|
7546
|
-
static __to_binding(data) {
|
7547
|
-
return data.#inner;
|
7548
|
-
}
|
7549
|
-
constructor(binding){
|
7550
|
-
this.#inner = binding, Object.defineProperties(this, {
|
7551
|
-
context: {
|
7552
|
-
enumerable: !0,
|
7553
|
-
get: ()=>binding.context,
|
7554
|
-
set (val) {
|
7555
|
-
binding.context = val;
|
7556
|
-
}
|
7557
|
-
},
|
7558
|
-
request: {
|
7559
|
-
enumerable: !0,
|
7560
|
-
get: ()=>binding.request,
|
7561
|
-
set (val) {
|
7562
|
-
binding.request = val;
|
7563
|
-
}
|
7564
|
-
},
|
7565
|
-
regExp: {
|
7566
|
-
enumerable: !0,
|
7567
|
-
get: ()=>binding.regExp,
|
7568
|
-
set (val) {
|
7569
|
-
binding.regExp = val;
|
7570
|
-
}
|
7571
|
-
},
|
7572
|
-
recursive: {
|
7573
|
-
enumerable: !0,
|
7574
|
-
get: ()=>binding.recursive,
|
7575
|
-
set (val) {
|
7576
|
-
binding.recursive = val;
|
7577
|
-
}
|
7578
|
-
}
|
7579
|
-
});
|
7580
|
-
}
|
7581
|
-
}
|
7582
|
-
class ContextModuleFactoryAfterResolveData {
|
7583
|
-
#inner;
|
7584
|
-
static __from_binding(binding) {
|
7585
|
-
return new ContextModuleFactoryAfterResolveData(binding);
|
7586
|
-
}
|
7587
|
-
static __to_binding(data) {
|
7588
|
-
return data.#inner;
|
7589
|
-
}
|
7590
|
-
constructor(binding){
|
7591
|
-
this.#inner = binding, Object.defineProperties(this, {
|
7592
|
-
resource: {
|
7593
|
-
enumerable: !0,
|
7594
|
-
get: ()=>binding.resource,
|
7595
|
-
set (val) {
|
7596
|
-
binding.resource = val;
|
7597
|
-
}
|
7598
|
-
},
|
7599
|
-
context: {
|
7600
|
-
enumerable: !0,
|
7601
|
-
get: ()=>binding.context,
|
7602
|
-
set (val) {
|
7603
|
-
binding.context = val;
|
7604
|
-
}
|
7605
|
-
},
|
7606
|
-
request: {
|
7607
|
-
enumerable: !0,
|
7608
|
-
get: ()=>binding.request,
|
7609
|
-
set (val) {
|
7610
|
-
binding.request = val;
|
7611
|
-
}
|
7612
|
-
},
|
7613
|
-
regExp: {
|
7614
|
-
enumerable: !0,
|
7615
|
-
get: ()=>binding.regExp,
|
7616
|
-
set (val) {
|
7617
|
-
binding.regExp = val;
|
7618
|
-
}
|
7619
|
-
},
|
7620
|
-
recursive: {
|
7621
|
-
enumerable: !0,
|
7622
|
-
get: ()=>binding.recursive,
|
7623
|
-
set (val) {
|
7624
|
-
binding.recursive = val;
|
7625
|
-
}
|
7626
|
-
},
|
7627
|
-
dependencies: {
|
7628
|
-
enumerable: !0,
|
7629
|
-
get: ()=>binding.dependencies
|
7630
|
-
}
|
7631
|
-
});
|
7632
|
-
}
|
7633
|
-
}
|
7634
|
-
Object.defineProperty(binding_.Module.prototype, "identifier", {
|
7635
|
-
enumerable: !0,
|
7636
|
-
configurable: !0,
|
7637
|
-
value () {
|
7638
|
-
return this[binding_.MODULE_IDENTIFIER_SYMBOL];
|
7639
|
-
}
|
7640
|
-
}), Object.defineProperty(binding_.Module.prototype, "readableIdentifier", {
|
7641
|
-
enumerable: !0,
|
7642
|
-
configurable: !0,
|
7643
|
-
value () {
|
7644
|
-
return this._readableIdentifier;
|
7645
|
-
}
|
7646
|
-
}), Object.defineProperty(binding_.Module.prototype, "originalSource", {
|
7647
|
-
enumerable: !0,
|
7648
|
-
configurable: !0,
|
7649
|
-
value () {
|
7650
|
-
let originalSource = this._originalSource();
|
7651
|
-
return originalSource ? JsSource.__from_binding(originalSource) : null;
|
7652
|
-
}
|
7653
|
-
}), Object.defineProperty(binding_.Module.prototype, "emitFile", {
|
7654
|
-
enumerable: !0,
|
7655
|
-
configurable: !0,
|
7656
|
-
value (filename, source, assetInfo) {
|
7657
|
-
return this._emitFile(filename, JsSource.__to_binding(source), assetInfo);
|
7658
|
-
}
|
7659
|
-
});
|
7660
|
-
class CodeGenerationResult {
|
7661
|
-
#inner;
|
7662
|
-
constructor(result){
|
7663
|
-
this.#inner = result;
|
7664
|
-
}
|
7665
|
-
get(sourceType) {
|
7666
|
-
return this.#inner.sources[sourceType];
|
7667
|
-
}
|
7668
|
-
}
|
7669
|
-
let RESERVED_RUNTIME_GLOBALS = new Map();
|
7566
|
+
}, RESERVED_RUNTIME_GLOBALS = new Map();
|
7670
7567
|
function __from_binding_runtime_globals(runtimeRequirements) {
|
7671
7568
|
let res = new Set();
|
7672
7569
|
for (let flag of runtimeRequirements.value)flag in RuntimeGlobals ? res.add(RuntimeGlobals[flag]) : res.add(flag);
|
@@ -7755,7 +7652,17 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
7755
7652
|
asyncModule: "__webpack_require__.a"
|
7756
7653
|
};
|
7757
7654
|
for (let entry of Object.entries(RuntimeGlobals))RESERVED_RUNTIME_GLOBALS.set(entry[1], entry[0]);
|
7758
|
-
let isReservedRuntimeGlobal = (r)=>RESERVED_RUNTIME_GLOBALS.has(r)
|
7655
|
+
let isReservedRuntimeGlobal = (r)=>RESERVED_RUNTIME_GLOBALS.has(r);
|
7656
|
+
class CodeGenerationResult {
|
7657
|
+
#inner;
|
7658
|
+
constructor(result){
|
7659
|
+
this.#inner = result;
|
7660
|
+
}
|
7661
|
+
get(sourceType) {
|
7662
|
+
return this.#inner.sources[sourceType];
|
7663
|
+
}
|
7664
|
+
}
|
7665
|
+
let createCompilationHooksRegisters = (getCompiler, createTap, createMapTap)=>({
|
7759
7666
|
registerCompilationAdditionalTreeRuntimeRequirementsTaps: createTap(binding_.RegisterJsTapKind.CompilationAdditionalTreeRuntimeRequirements, function() {
|
7760
7667
|
return getCompiler().__internal__get_compilation().hooks.additionalTreeRuntimeRequirements;
|
7761
7668
|
}, function(queried) {
|
@@ -7816,7 +7723,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
7816
7723
|
}, function(queried) {
|
7817
7724
|
return function({ entry, id, codegenResults, runtimeModules }) {
|
7818
7725
|
try {
|
7819
|
-
let
|
7726
|
+
let __nested_webpack_require_4944_4963__ = (id)=>{
|
7820
7727
|
let cached = moduleCache[id];
|
7821
7728
|
if (void 0 !== cached) {
|
7822
7729
|
if (cached.error) throw cached.error;
|
@@ -7830,7 +7737,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
7830
7737
|
loaded: !1,
|
7831
7738
|
error: void 0
|
7832
7739
|
},
|
7833
|
-
require:
|
7740
|
+
require: __nested_webpack_require_4944_4963__
|
7834
7741
|
};
|
7835
7742
|
for (let handler of interceptModuleExecution)handler(execOptions);
|
7836
7743
|
let result = codegenResults.map[id]["build time"], moduleObject = execOptions.module;
|
@@ -7838,11 +7745,11 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
7838
7745
|
codeGenerationResult: new CodeGenerationResult(result),
|
7839
7746
|
moduleObject
|
7840
7747
|
}, {
|
7841
|
-
__webpack_require__:
|
7748
|
+
__webpack_require__: __nested_webpack_require_4944_4963__
|
7842
7749
|
}), "Compilation.hooks.executeModule"), moduleObject.loaded = !0, moduleObject.exports;
|
7843
|
-
}, moduleCache =
|
7844
|
-
for (let runtimeModule of runtimeModules)
|
7845
|
-
let executeResult =
|
7750
|
+
}, moduleCache = __nested_webpack_require_4944_4963__[RuntimeGlobals.moduleCache.replace(`${RuntimeGlobals.require}.`, "")] = {}, interceptModuleExecution = __nested_webpack_require_4944_4963__[RuntimeGlobals.interceptModuleExecution.replace(`${RuntimeGlobals.require}.`, "")] = [];
|
7751
|
+
for (let runtimeModule of runtimeModules)__nested_webpack_require_4944_4963__(runtimeModule);
|
7752
|
+
let executeResult = __nested_webpack_require_4944_4963__(entry);
|
7846
7753
|
getCompiler().__internal__get_module_execution_results_map().set(id, executeResult);
|
7847
7754
|
} catch (e) {
|
7848
7755
|
throw getCompiler().__internal__get_module_execution_results_map().set(id, e), e;
|
@@ -7996,7 +7903,127 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
7996
7903
|
});
|
7997
7904
|
};
|
7998
7905
|
})
|
7999
|
-
})
|
7906
|
+
});
|
7907
|
+
class ContextModuleFactoryBeforeResolveData {
|
7908
|
+
#inner;
|
7909
|
+
static __from_binding(binding) {
|
7910
|
+
return new ContextModuleFactoryBeforeResolveData(binding);
|
7911
|
+
}
|
7912
|
+
static __to_binding(data) {
|
7913
|
+
return data.#inner;
|
7914
|
+
}
|
7915
|
+
constructor(binding){
|
7916
|
+
this.#inner = binding, Object.defineProperties(this, {
|
7917
|
+
context: {
|
7918
|
+
enumerable: !0,
|
7919
|
+
get: ()=>binding.context,
|
7920
|
+
set (val) {
|
7921
|
+
binding.context = val;
|
7922
|
+
}
|
7923
|
+
},
|
7924
|
+
request: {
|
7925
|
+
enumerable: !0,
|
7926
|
+
get: ()=>binding.request,
|
7927
|
+
set (val) {
|
7928
|
+
binding.request = val;
|
7929
|
+
}
|
7930
|
+
},
|
7931
|
+
regExp: {
|
7932
|
+
enumerable: !0,
|
7933
|
+
get: ()=>binding.regExp,
|
7934
|
+
set (val) {
|
7935
|
+
binding.regExp = val;
|
7936
|
+
}
|
7937
|
+
},
|
7938
|
+
recursive: {
|
7939
|
+
enumerable: !0,
|
7940
|
+
get: ()=>binding.recursive,
|
7941
|
+
set (val) {
|
7942
|
+
binding.recursive = val;
|
7943
|
+
}
|
7944
|
+
}
|
7945
|
+
});
|
7946
|
+
}
|
7947
|
+
}
|
7948
|
+
class ContextModuleFactoryAfterResolveData {
|
7949
|
+
#inner;
|
7950
|
+
static __from_binding(binding) {
|
7951
|
+
return new ContextModuleFactoryAfterResolveData(binding);
|
7952
|
+
}
|
7953
|
+
static __to_binding(data) {
|
7954
|
+
return data.#inner;
|
7955
|
+
}
|
7956
|
+
constructor(binding){
|
7957
|
+
this.#inner = binding, Object.defineProperties(this, {
|
7958
|
+
resource: {
|
7959
|
+
enumerable: !0,
|
7960
|
+
get: ()=>binding.resource,
|
7961
|
+
set (val) {
|
7962
|
+
binding.resource = val;
|
7963
|
+
}
|
7964
|
+
},
|
7965
|
+
context: {
|
7966
|
+
enumerable: !0,
|
7967
|
+
get: ()=>binding.context,
|
7968
|
+
set (val) {
|
7969
|
+
binding.context = val;
|
7970
|
+
}
|
7971
|
+
},
|
7972
|
+
request: {
|
7973
|
+
enumerable: !0,
|
7974
|
+
get: ()=>binding.request,
|
7975
|
+
set (val) {
|
7976
|
+
binding.request = val;
|
7977
|
+
}
|
7978
|
+
},
|
7979
|
+
regExp: {
|
7980
|
+
enumerable: !0,
|
7981
|
+
get: ()=>binding.regExp,
|
7982
|
+
set (val) {
|
7983
|
+
binding.regExp = val;
|
7984
|
+
}
|
7985
|
+
},
|
7986
|
+
recursive: {
|
7987
|
+
enumerable: !0,
|
7988
|
+
get: ()=>binding.recursive,
|
7989
|
+
set (val) {
|
7990
|
+
binding.recursive = val;
|
7991
|
+
}
|
7992
|
+
},
|
7993
|
+
dependencies: {
|
7994
|
+
enumerable: !0,
|
7995
|
+
get: ()=>binding.dependencies
|
7996
|
+
}
|
7997
|
+
});
|
7998
|
+
}
|
7999
|
+
}
|
8000
|
+
Object.defineProperty(binding_.Module.prototype, "identifier", {
|
8001
|
+
enumerable: !0,
|
8002
|
+
configurable: !0,
|
8003
|
+
value () {
|
8004
|
+
return this[binding_.MODULE_IDENTIFIER_SYMBOL];
|
8005
|
+
}
|
8006
|
+
}), Object.defineProperty(binding_.Module.prototype, "readableIdentifier", {
|
8007
|
+
enumerable: !0,
|
8008
|
+
configurable: !0,
|
8009
|
+
value () {
|
8010
|
+
return this._readableIdentifier;
|
8011
|
+
}
|
8012
|
+
}), Object.defineProperty(binding_.Module.prototype, "originalSource", {
|
8013
|
+
enumerable: !0,
|
8014
|
+
configurable: !0,
|
8015
|
+
value () {
|
8016
|
+
let originalSource = this._originalSource();
|
8017
|
+
return originalSource ? JsSource.__from_binding(originalSource) : null;
|
8018
|
+
}
|
8019
|
+
}), Object.defineProperty(binding_.Module.prototype, "emitFile", {
|
8020
|
+
enumerable: !0,
|
8021
|
+
configurable: !0,
|
8022
|
+
value (filename, source, assetInfo) {
|
8023
|
+
return this._emitFile(filename, JsSource.__to_binding(source), assetInfo);
|
8024
|
+
}
|
8025
|
+
});
|
8026
|
+
let createContextModuleFactoryHooksRegisters = (getCompiler, createTap, createMapTap)=>({
|
8000
8027
|
registerContextModuleFactoryBeforeResolveTaps: createTap(binding_.RegisterJsTapKind.ContextModuleFactoryBeforeResolve, function() {
|
8001
8028
|
return getCompiler().__internal__get_compilation_params().contextModuleFactory.hooks.beforeResolve;
|
8002
8029
|
}, function(queried) {
|
@@ -8307,7 +8334,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8307
8334
|
let startTime = Date.now();
|
8308
8335
|
this.running = !0;
|
8309
8336
|
let instanceBinding = __webpack_require__("@rspack/binding"), isRuntimeShutdown = !1, finalCallback = (err, stats)=>{
|
8310
|
-
this.idle = !0, this.cache.beginIdle(), this.idle = !0, this.running = !1, err && this.hooks.failed.call(err), callback && callback(err, stats), this.hooks.afterDone.call(stats), instanceBinding.shutdownAsyncRuntime();
|
8337
|
+
this.idle = !0, this.cache.beginIdle(), this.idle = !0, this.running = !1, err && this.hooks.failed.call(err), callback && callback(err, stats), this.hooks.afterDone.call(stats), instanceBinding.shutdownAsyncRuntime(), instanceBinding.cleanupGlobalTrace();
|
8311
8338
|
}, onCompiled = (err, _compilation)=>{
|
8312
8339
|
if (err) return finalCallback(err);
|
8313
8340
|
if (_compilation.hooks.needAdditionalPass.call()) {
|
@@ -8581,7 +8608,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8581
8608
|
obj.children = this.stats.map((stat, idx)=>{
|
8582
8609
|
let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
|
8583
8610
|
return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
|
8584
|
-
}), childOptions.version && (obj.rspackVersion = "1.3.
|
8611
|
+
}), childOptions.version && (obj.rspackVersion = "1.3.10", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
|
8585
8612
|
let mapError = (j, obj)=>({
|
8586
8613
|
...obj,
|
8587
8614
|
compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
|
@@ -9471,7 +9498,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
9471
9498
|
object.hash = context.getStatsCompilation(compilation).hash;
|
9472
9499
|
},
|
9473
9500
|
version: (object)=>{
|
9474
|
-
object.version = "5.75.0", object.rspackVersion = "1.3.
|
9501
|
+
object.version = "5.75.0", object.rspackVersion = "1.3.10";
|
9475
9502
|
},
|
9476
9503
|
env: (object, _compilation, _context, { _env })=>{
|
9477
9504
|
object.env = _env;
|
@@ -12147,12 +12174,15 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12147
12174
|
maxSize: zod_index_js_namespaceObject.z.number().optional()
|
12148
12175
|
}), assetParserOptions = zod_index_js_namespaceObject.z.strictObject({
|
12149
12176
|
dataUrlCondition: assetParserDataUrlOptions.optional()
|
12150
|
-
}), cssParserNamedExports = zod_index_js_namespaceObject.z.boolean(), cssParserOptions = zod_index_js_namespaceObject.z.strictObject({
|
12151
|
-
namedExports: cssParserNamedExports.optional()
|
12177
|
+
}), cssParserNamedExports = zod_index_js_namespaceObject.z.boolean(), cssParserUrl = zod_index_js_namespaceObject.z.boolean(), cssParserOptions = zod_index_js_namespaceObject.z.strictObject({
|
12178
|
+
namedExports: cssParserNamedExports.optional(),
|
12179
|
+
url: cssParserUrl.optional()
|
12152
12180
|
}), cssAutoParserOptions = zod_index_js_namespaceObject.z.strictObject({
|
12153
|
-
namedExports: cssParserNamedExports.optional()
|
12181
|
+
namedExports: cssParserNamedExports.optional(),
|
12182
|
+
url: cssParserUrl.optional()
|
12154
12183
|
}), cssModuleParserOptions = zod_index_js_namespaceObject.z.strictObject({
|
12155
|
-
namedExports: cssParserNamedExports.optional()
|
12184
|
+
namedExports: cssParserNamedExports.optional(),
|
12185
|
+
url: cssParserUrl.optional()
|
12156
12186
|
}), dynamicImportMode = zod_index_js_namespaceObject.z.enum([
|
12157
12187
|
"eager",
|
12158
12188
|
"lazy",
|
@@ -12215,7 +12245,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12215
12245
|
"javascript/auto": javascriptParserOptions.optional(),
|
12216
12246
|
"javascript/dynamic": javascriptParserOptions.optional(),
|
12217
12247
|
"javascript/esm": javascriptParserOptions.optional()
|
12218
|
-
}),
|
12248
|
+
}), assetGeneratorDataUrlOptions = zod_index_js_namespaceObject.z.strictObject({
|
12219
12249
|
encoding: zod_index_js_namespaceObject.z.literal(!1).or(zod_index_js_namespaceObject.z.literal("base64")).optional(),
|
12220
12250
|
mimetype: zod_index_js_namespaceObject.z.string().optional()
|
12221
12251
|
}), assetGeneratorDataUrlFunction = zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.instanceof(Buffer), zod_index_js_namespaceObject.z.strictObject({
|
@@ -12226,7 +12256,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12226
12256
|
}), assetResourceGeneratorOptions = zod_index_js_namespaceObject.z.strictObject({
|
12227
12257
|
emit: zod_index_js_namespaceObject.z.boolean().optional(),
|
12228
12258
|
filename: zod_filename.optional(),
|
12229
|
-
publicPath: zod_publicPath.optional()
|
12259
|
+
publicPath: zod_publicPath.optional(),
|
12260
|
+
outputPath: zod_filename.optional()
|
12230
12261
|
}), assetGeneratorOptions = assetInlineGeneratorOptions.merge(assetResourceGeneratorOptions), cssGeneratorExportsConvention = zod_index_js_namespaceObject.z.enum([
|
12231
12262
|
"as-is",
|
12232
12263
|
"camel-case",
|
@@ -12256,11 +12287,11 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12256
12287
|
"css/auto": cssAutoGeneratorOptions.optional(),
|
12257
12288
|
"css/module": cssModuleGeneratorOptions.optional(),
|
12258
12289
|
json: jsonGeneratorOptions.optional()
|
12259
|
-
}),
|
12290
|
+
}), noParseOptionSingle = zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.string()).returns(zod_index_js_namespaceObject.z.boolean())), noParseOption = noParseOptionSingle.or(zod_index_js_namespaceObject.z.array(noParseOptionSingle)), moduleOptions = zod_index_js_namespaceObject.z.strictObject({
|
12260
12291
|
defaultRules: ruleSetRules.optional(),
|
12261
12292
|
rules: ruleSetRules.optional(),
|
12262
|
-
parser:
|
12263
|
-
generator:
|
12293
|
+
parser: parserOptionsByModuleTypeKnown.optional(),
|
12294
|
+
generator: generatorOptionsByModuleTypeKnown.optional(),
|
12264
12295
|
noParse: noParseOption.optional()
|
12265
12296
|
}), allowTarget = zod_index_js_namespaceObject.z.union([
|
12266
12297
|
zod_index_js_namespaceObject.z.enum([
|
@@ -13130,7 +13161,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
13130
13161
|
let _options = JSON.stringify(options || {});
|
13131
13162
|
return binding_default().transform(source, _options);
|
13132
13163
|
}
|
13133
|
-
let exports_rspackVersion = "1.3.
|
13164
|
+
let exports_rspackVersion = "1.3.10", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
|
13134
13165
|
getNormalizedRspackOptions: getNormalizedRspackOptions,
|
13135
13166
|
applyRspackOptionsDefaults: applyRspackOptionsDefaults,
|
13136
13167
|
getNormalizedWebpackOptions: getNormalizedRspackOptions,
|
@@ -13211,7 +13242,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
13211
13242
|
}, exports_experiments = {
|
13212
13243
|
globalTrace: {
|
13213
13244
|
async register (filter, layer, output) {
|
13214
|
-
JavaScriptTracer.initJavaScriptTrace(layer, output), (0, binding_.registerGlobalTrace)(filter, layer, output), JavaScriptTracer.initCpuProfiler();
|
13245
|
+
await JavaScriptTracer.initJavaScriptTrace(layer, output), (0, binding_.registerGlobalTrace)(filter, layer, output), JavaScriptTracer.initCpuProfiler();
|
13215
13246
|
},
|
13216
13247
|
async cleanup () {
|
13217
13248
|
(0, binding_.cleanupGlobalTrace)(), JavaScriptTracer.cleanupJavaScriptTrace();
|
@@ -1,2 +1,8 @@
|
|
1
|
+
import * as binding from "@rspack/binding";
|
1
2
|
import type { CreatePartialRegisters } from "./types";
|
3
|
+
export declare class CodeGenerationResult {
|
4
|
+
#private;
|
5
|
+
constructor(result: binding.JsCodegenerationResult);
|
6
|
+
get(sourceType: string): string;
|
7
|
+
}
|
2
8
|
export declare const createCompilationHooksRegisters: CreatePartialRegisters<`Compilation`>;
|
package/dist/trace/index.d.ts
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
import inspector from "node:inspector";
|
2
1
|
export interface ChromeEvent {
|
3
2
|
name: string;
|
4
3
|
ph?: string;
|
@@ -20,8 +19,8 @@ export declare class JavaScriptTracer {
|
|
20
19
|
static events: ChromeEvent[];
|
21
20
|
static layer: string;
|
22
21
|
static output: string;
|
23
|
-
static session: inspector.Session;
|
24
|
-
static initJavaScriptTrace(layer: string, output: string): void
|
22
|
+
static session: import("node:inspector").Session;
|
23
|
+
static initJavaScriptTrace(layer: string, output: string): Promise<void>;
|
25
24
|
static initCpuProfiler(): void;
|
26
25
|
static cleanupJavaScriptTrace(): Promise<void>;
|
27
26
|
static getTs(): number;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspack/core",
|
3
|
-
"version": "1.3.
|
3
|
+
"version": "1.3.10",
|
4
4
|
"webpackVersion": "5.75.0",
|
5
5
|
"license": "MIT",
|
6
6
|
"description": "The fast Rust-based web bundler with webpack-compatible API",
|
@@ -59,7 +59,7 @@
|
|
59
59
|
"@module-federation/runtime-tools": "0.13.1",
|
60
60
|
"@rspack/lite-tapable": "1.0.1",
|
61
61
|
"caniuse-lite": "^1.0.30001717",
|
62
|
-
"@rspack/binding": "1.3.
|
62
|
+
"@rspack/binding": "1.3.10"
|
63
63
|
},
|
64
64
|
"peerDependencies": {
|
65
65
|
"@swc/helpers": ">=0.5.1"
|