@rspack/core 0.5.9-canary-ff5bff8-20240403030946 → 0.5.9-canary-6952f10-20240404010911
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/Compiler.js +0 -5
- package/dist/builtin-plugin/EntryPlugin.js +1 -1
- package/dist/builtin-plugin/ExternalsPlugin.d.ts +2 -2
- package/dist/config/defaults.js +0 -1
- package/dist/config/zod.d.ts +8 -23
- package/dist/config/zod.js +0 -1
- package/dist/container/ContainerReferencePlugin.d.ts +1 -1
- package/dist/exports.d.ts +8 -10
- package/dist/rspackOptionsApply.d.ts +0 -1
- package/dist/rspackOptionsApply.js +4 -20
- package/package.json +4 -4
package/dist/Compiler.js
CHANGED
|
@@ -69,7 +69,6 @@ const NormalModuleFactory_1 = require("./NormalModuleFactory");
|
|
|
69
69
|
const bindingVersionCheck_1 = require("./util/bindingVersionCheck");
|
|
70
70
|
const Watching_1 = require("./Watching");
|
|
71
71
|
const builtin_plugin_1 = require("./builtin-plugin");
|
|
72
|
-
const rspackOptionsApply_1 = require("./rspackOptionsApply");
|
|
73
72
|
const defaults_1 = require("./config/defaults");
|
|
74
73
|
const assertNotNil_1 = require("./util/assertNotNil");
|
|
75
74
|
const RuntimeGlobals_1 = require("./RuntimeGlobals");
|
|
@@ -480,10 +479,6 @@ _Compiler_instance = new WeakMap(), _Compiler_initial = new WeakMap(), _Compiler
|
|
|
480
479
|
return callback(null, __classPrivateFieldGet(this, _Compiler_instance, "f"));
|
|
481
480
|
}
|
|
482
481
|
const options = this.options;
|
|
483
|
-
// TODO: remove this in v0.6
|
|
484
|
-
if (!options.experiments.rspackFuture.disableApplyEntryLazily) {
|
|
485
|
-
(0, rspackOptionsApply_1.applyEntryOptions)(this, options);
|
|
486
|
-
}
|
|
487
482
|
// TODO: remove this when drop support for builtins options
|
|
488
483
|
options.builtins = (0, builtin_plugin_1.deprecated_resolveBuiltins)(options.builtins, options);
|
|
489
484
|
const rawOptions = (0, config_1.getRawOptions)(options, this);
|
|
@@ -12,7 +12,7 @@ exports.EntryPlugin = (0, base_1.create)(binding_1.BuiltinPluginName.EntryPlugin
|
|
|
12
12
|
entry,
|
|
13
13
|
options: getRawEntryOptions(entryOptions)
|
|
14
14
|
};
|
|
15
|
-
});
|
|
15
|
+
}, "make");
|
|
16
16
|
function getRawEntryOptions(entry) {
|
|
17
17
|
const runtime = entry.runtime;
|
|
18
18
|
const chunkLoading = entry.chunkLoading;
|
|
@@ -4,7 +4,7 @@ export declare const ExternalsPlugin: {
|
|
|
4
4
|
context?: string | undefined;
|
|
5
5
|
dependencyType?: string | undefined;
|
|
6
6
|
request?: string | undefined;
|
|
7
|
-
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "
|
|
7
|
+
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "global" | "import" | "amd" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "jsonp" | "system" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
|
|
8
8
|
context?: string | undefined;
|
|
9
9
|
dependencyType?: string | undefined;
|
|
10
10
|
request?: string | undefined;
|
|
@@ -12,7 +12,7 @@ export declare const ExternalsPlugin: {
|
|
|
12
12
|
context?: string | undefined;
|
|
13
13
|
dependencyType?: string | undefined;
|
|
14
14
|
request?: string | undefined;
|
|
15
|
-
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "
|
|
15
|
+
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "global" | "import" | "amd" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "jsonp" | "system" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
|
|
16
16
|
context?: string | undefined;
|
|
17
17
|
dependencyType?: string | undefined;
|
|
18
18
|
request?: string | undefined;
|
package/dist/config/defaults.js
CHANGED
|
@@ -113,7 +113,6 @@ const applyExperimentsDefaults = (experiments, { cache }) => {
|
|
|
113
113
|
D(experiments, "rspackFuture", {});
|
|
114
114
|
if (typeof experiments.rspackFuture === "object") {
|
|
115
115
|
D(experiments.rspackFuture, "newTreeshaking", false);
|
|
116
|
-
D(experiments.rspackFuture, "disableApplyEntryLazily", true);
|
|
117
116
|
D(experiments.rspackFuture, "bundlerInfo", {});
|
|
118
117
|
if (typeof experiments.rspackFuture.bundlerInfo === "object") {
|
|
119
118
|
D(experiments.rspackFuture.bundlerInfo, "version", require("../../package.json").version);
|
package/dist/config/zod.d.ts
CHANGED
|
@@ -3886,7 +3886,6 @@ declare const optimization: z.ZodObject<{
|
|
|
3886
3886
|
export type Optimization = z.infer<typeof optimization>;
|
|
3887
3887
|
declare const rspackFutureOptions: z.ZodObject<{
|
|
3888
3888
|
newTreeshaking: z.ZodOptional<z.ZodBoolean>;
|
|
3889
|
-
disableApplyEntryLazily: z.ZodOptional<z.ZodBoolean>;
|
|
3890
3889
|
bundlerInfo: z.ZodOptional<z.ZodObject<{
|
|
3891
3890
|
version: z.ZodOptional<z.ZodString>;
|
|
3892
3891
|
force: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEnum<["version"]>, "many">]>>;
|
|
@@ -3899,14 +3898,12 @@ declare const rspackFutureOptions: z.ZodObject<{
|
|
|
3899
3898
|
}>>;
|
|
3900
3899
|
}, "strict", z.ZodTypeAny, {
|
|
3901
3900
|
newTreeshaking?: boolean | undefined;
|
|
3902
|
-
disableApplyEntryLazily?: boolean | undefined;
|
|
3903
3901
|
bundlerInfo?: {
|
|
3904
3902
|
version?: string | undefined;
|
|
3905
3903
|
force?: boolean | "version"[] | undefined;
|
|
3906
3904
|
} | undefined;
|
|
3907
3905
|
}, {
|
|
3908
3906
|
newTreeshaking?: boolean | undefined;
|
|
3909
|
-
disableApplyEntryLazily?: boolean | undefined;
|
|
3910
3907
|
bundlerInfo?: {
|
|
3911
3908
|
version?: string | undefined;
|
|
3912
3909
|
force?: boolean | "version"[] | undefined;
|
|
@@ -3923,7 +3920,6 @@ declare const experiments: z.ZodObject<{
|
|
|
3923
3920
|
futureDefaults: z.ZodOptional<z.ZodBoolean>;
|
|
3924
3921
|
rspackFuture: z.ZodOptional<z.ZodObject<{
|
|
3925
3922
|
newTreeshaking: z.ZodOptional<z.ZodBoolean>;
|
|
3926
|
-
disableApplyEntryLazily: z.ZodOptional<z.ZodBoolean>;
|
|
3927
3923
|
bundlerInfo: z.ZodOptional<z.ZodObject<{
|
|
3928
3924
|
version: z.ZodOptional<z.ZodString>;
|
|
3929
3925
|
force: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEnum<["version"]>, "many">]>>;
|
|
@@ -3936,14 +3932,12 @@ declare const experiments: z.ZodObject<{
|
|
|
3936
3932
|
}>>;
|
|
3937
3933
|
}, "strict", z.ZodTypeAny, {
|
|
3938
3934
|
newTreeshaking?: boolean | undefined;
|
|
3939
|
-
disableApplyEntryLazily?: boolean | undefined;
|
|
3940
3935
|
bundlerInfo?: {
|
|
3941
3936
|
version?: string | undefined;
|
|
3942
3937
|
force?: boolean | "version"[] | undefined;
|
|
3943
3938
|
} | undefined;
|
|
3944
3939
|
}, {
|
|
3945
3940
|
newTreeshaking?: boolean | undefined;
|
|
3946
|
-
disableApplyEntryLazily?: boolean | undefined;
|
|
3947
3941
|
bundlerInfo?: {
|
|
3948
3942
|
version?: string | undefined;
|
|
3949
3943
|
force?: boolean | "version"[] | undefined;
|
|
@@ -3959,7 +3953,6 @@ declare const experiments: z.ZodObject<{
|
|
|
3959
3953
|
futureDefaults?: boolean | undefined;
|
|
3960
3954
|
rspackFuture?: {
|
|
3961
3955
|
newTreeshaking?: boolean | undefined;
|
|
3962
|
-
disableApplyEntryLazily?: boolean | undefined;
|
|
3963
3956
|
bundlerInfo?: {
|
|
3964
3957
|
version?: string | undefined;
|
|
3965
3958
|
force?: boolean | "version"[] | undefined;
|
|
@@ -3975,7 +3968,6 @@ declare const experiments: z.ZodObject<{
|
|
|
3975
3968
|
futureDefaults?: boolean | undefined;
|
|
3976
3969
|
rspackFuture?: {
|
|
3977
3970
|
newTreeshaking?: boolean | undefined;
|
|
3978
|
-
disableApplyEntryLazily?: boolean | undefined;
|
|
3979
3971
|
bundlerInfo?: {
|
|
3980
3972
|
version?: string | undefined;
|
|
3981
3973
|
force?: boolean | "version"[] | undefined;
|
|
@@ -4591,7 +4583,6 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
4591
4583
|
futureDefaults: z.ZodOptional<z.ZodBoolean>;
|
|
4592
4584
|
rspackFuture: z.ZodOptional<z.ZodObject<{
|
|
4593
4585
|
newTreeshaking: z.ZodOptional<z.ZodBoolean>;
|
|
4594
|
-
disableApplyEntryLazily: z.ZodOptional<z.ZodBoolean>;
|
|
4595
4586
|
bundlerInfo: z.ZodOptional<z.ZodObject<{
|
|
4596
4587
|
version: z.ZodOptional<z.ZodString>;
|
|
4597
4588
|
force: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEnum<["version"]>, "many">]>>;
|
|
@@ -4604,14 +4595,12 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
4604
4595
|
}>>;
|
|
4605
4596
|
}, "strict", z.ZodTypeAny, {
|
|
4606
4597
|
newTreeshaking?: boolean | undefined;
|
|
4607
|
-
disableApplyEntryLazily?: boolean | undefined;
|
|
4608
4598
|
bundlerInfo?: {
|
|
4609
4599
|
version?: string | undefined;
|
|
4610
4600
|
force?: boolean | "version"[] | undefined;
|
|
4611
4601
|
} | undefined;
|
|
4612
4602
|
}, {
|
|
4613
4603
|
newTreeshaking?: boolean | undefined;
|
|
4614
|
-
disableApplyEntryLazily?: boolean | undefined;
|
|
4615
4604
|
bundlerInfo?: {
|
|
4616
4605
|
version?: string | undefined;
|
|
4617
4606
|
force?: boolean | "version"[] | undefined;
|
|
@@ -4627,7 +4616,6 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
4627
4616
|
futureDefaults?: boolean | undefined;
|
|
4628
4617
|
rspackFuture?: {
|
|
4629
4618
|
newTreeshaking?: boolean | undefined;
|
|
4630
|
-
disableApplyEntryLazily?: boolean | undefined;
|
|
4631
4619
|
bundlerInfo?: {
|
|
4632
4620
|
version?: string | undefined;
|
|
4633
4621
|
force?: boolean | "version"[] | undefined;
|
|
@@ -4643,7 +4631,6 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
4643
4631
|
futureDefaults?: boolean | undefined;
|
|
4644
4632
|
rspackFuture?: {
|
|
4645
4633
|
newTreeshaking?: boolean | undefined;
|
|
4646
|
-
disableApplyEntryLazily?: boolean | undefined;
|
|
4647
4634
|
bundlerInfo?: {
|
|
4648
4635
|
version?: string | undefined;
|
|
4649
4636
|
force?: boolean | "version"[] | undefined;
|
|
@@ -5808,7 +5795,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
5808
5795
|
devtoolModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
|
|
5809
5796
|
devtoolFallbackModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
|
|
5810
5797
|
} | undefined;
|
|
5811
|
-
target?: false | "node" | "
|
|
5798
|
+
target?: false | "node" | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | "async-node" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | "electron-main" | `electron${number}-main` | `electron${number}.${number}-main` | "electron-renderer" | `electron${number}-renderer` | `electron${number}.${number}-renderer` | "electron-preload" | `electron${number}-preload` | `electron${number}.${number}-preload` | ("node" | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | "async-node" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | "electron-main" | `electron${number}-main` | `electron${number}.${number}-main` | "electron-renderer" | `electron${number}-renderer` | `electron${number}.${number}-renderer` | "electron-preload" | `electron${number}-preload` | `electron${number}.${number}-preload`)[] | undefined;
|
|
5812
5799
|
mode?: "production" | "development" | "none" | undefined;
|
|
5813
5800
|
experiments?: {
|
|
5814
5801
|
lazyCompilation?: boolean | undefined;
|
|
@@ -5820,7 +5807,6 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
5820
5807
|
futureDefaults?: boolean | undefined;
|
|
5821
5808
|
rspackFuture?: {
|
|
5822
5809
|
newTreeshaking?: boolean | undefined;
|
|
5823
|
-
disableApplyEntryLazily?: boolean | undefined;
|
|
5824
5810
|
bundlerInfo?: {
|
|
5825
5811
|
version?: string | undefined;
|
|
5826
5812
|
force?: boolean | "version"[] | undefined;
|
|
@@ -5831,7 +5817,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
5831
5817
|
context?: string | undefined;
|
|
5832
5818
|
dependencyType?: string | undefined;
|
|
5833
5819
|
request?: string | undefined;
|
|
5834
|
-
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "
|
|
5820
|
+
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "global" | "import" | "amd" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "jsonp" | "system" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
|
|
5835
5821
|
context?: string | undefined;
|
|
5836
5822
|
dependencyType?: string | undefined;
|
|
5837
5823
|
request?: string | undefined;
|
|
@@ -5839,12 +5825,12 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
5839
5825
|
context?: string | undefined;
|
|
5840
5826
|
dependencyType?: string | undefined;
|
|
5841
5827
|
request?: string | undefined;
|
|
5842
|
-
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "
|
|
5828
|
+
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "global" | "import" | "amd" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "jsonp" | "system" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
|
|
5843
5829
|
context?: string | undefined;
|
|
5844
5830
|
dependencyType?: string | undefined;
|
|
5845
5831
|
request?: string | undefined;
|
|
5846
5832
|
}, ...args_1: unknown[]) => Promise<string | boolean | string[] | Record<string, string | string[]>>))[] | undefined;
|
|
5847
|
-
externalsType?: "module" | "promise" | "script" | "commonjs" | "
|
|
5833
|
+
externalsType?: "module" | "promise" | "script" | "commonjs" | "global" | "import" | "amd" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "jsonp" | "system" | "node-commonjs" | undefined;
|
|
5848
5834
|
externalsPresets?: {
|
|
5849
5835
|
node?: boolean | undefined;
|
|
5850
5836
|
web?: boolean | undefined;
|
|
@@ -6191,7 +6177,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
6191
6177
|
devtoolModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
|
|
6192
6178
|
devtoolFallbackModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
|
|
6193
6179
|
} | undefined;
|
|
6194
|
-
target?: false | "node" | "
|
|
6180
|
+
target?: false | "node" | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | "async-node" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | "electron-main" | `electron${number}-main` | `electron${number}.${number}-main` | "electron-renderer" | `electron${number}-renderer` | `electron${number}.${number}-renderer` | "electron-preload" | `electron${number}-preload` | `electron${number}.${number}-preload` | ("node" | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | "async-node" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | "electron-main" | `electron${number}-main` | `electron${number}.${number}-main` | "electron-renderer" | `electron${number}-renderer` | `electron${number}.${number}-renderer` | "electron-preload" | `electron${number}-preload` | `electron${number}.${number}-preload`)[] | undefined;
|
|
6195
6181
|
mode?: "production" | "development" | "none" | undefined;
|
|
6196
6182
|
experiments?: {
|
|
6197
6183
|
lazyCompilation?: boolean | undefined;
|
|
@@ -6203,7 +6189,6 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
6203
6189
|
futureDefaults?: boolean | undefined;
|
|
6204
6190
|
rspackFuture?: {
|
|
6205
6191
|
newTreeshaking?: boolean | undefined;
|
|
6206
|
-
disableApplyEntryLazily?: boolean | undefined;
|
|
6207
6192
|
bundlerInfo?: {
|
|
6208
6193
|
version?: string | undefined;
|
|
6209
6194
|
force?: boolean | "version"[] | undefined;
|
|
@@ -6214,7 +6199,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
6214
6199
|
context?: string | undefined;
|
|
6215
6200
|
dependencyType?: string | undefined;
|
|
6216
6201
|
request?: string | undefined;
|
|
6217
|
-
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "
|
|
6202
|
+
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "global" | "import" | "amd" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "jsonp" | "system" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
|
|
6218
6203
|
context?: string | undefined;
|
|
6219
6204
|
dependencyType?: string | undefined;
|
|
6220
6205
|
request?: string | undefined;
|
|
@@ -6222,12 +6207,12 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
6222
6207
|
context?: string | undefined;
|
|
6223
6208
|
dependencyType?: string | undefined;
|
|
6224
6209
|
request?: string | undefined;
|
|
6225
|
-
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "
|
|
6210
|
+
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "global" | "import" | "amd" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "jsonp" | "system" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
|
|
6226
6211
|
context?: string | undefined;
|
|
6227
6212
|
dependencyType?: string | undefined;
|
|
6228
6213
|
request?: string | undefined;
|
|
6229
6214
|
}, ...args_1: unknown[]) => Promise<string | boolean | string[] | Record<string, string | string[]>>))[] | undefined;
|
|
6230
|
-
externalsType?: "module" | "promise" | "script" | "commonjs" | "
|
|
6215
|
+
externalsType?: "module" | "promise" | "script" | "commonjs" | "global" | "import" | "amd" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "jsonp" | "system" | "node-commonjs" | undefined;
|
|
6231
6216
|
externalsPresets?: {
|
|
6232
6217
|
node?: boolean | undefined;
|
|
6233
6218
|
web?: boolean | undefined;
|
package/dist/config/zod.js
CHANGED
|
@@ -730,7 +730,6 @@ const optimization = zod_1.z.strictObject({
|
|
|
730
730
|
//#region Experiments
|
|
731
731
|
const rspackFutureOptions = zod_1.z.strictObject({
|
|
732
732
|
newTreeshaking: zod_1.z.boolean().optional(),
|
|
733
|
-
disableApplyEntryLazily: zod_1.z.boolean().optional(),
|
|
734
733
|
bundlerInfo: zod_1.z
|
|
735
734
|
.strictObject({
|
|
736
735
|
version: zod_1.z.string().optional(),
|
|
@@ -21,7 +21,7 @@ export type RemotesConfig = {
|
|
|
21
21
|
export declare class ContainerReferencePlugin extends RspackBuiltinPlugin {
|
|
22
22
|
name: BuiltinPluginName;
|
|
23
23
|
_options: {
|
|
24
|
-
remoteType: "module" | "promise" | "script" | "commonjs" | "
|
|
24
|
+
remoteType: "module" | "promise" | "script" | "commonjs" | "global" | "import" | "amd" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "jsonp" | "system" | "node-commonjs";
|
|
25
25
|
remotes: [string, {
|
|
26
26
|
external: string[];
|
|
27
27
|
shareScope: string;
|
package/dist/exports.d.ts
CHANGED
|
@@ -156,7 +156,7 @@ export declare const config: {
|
|
|
156
156
|
devtoolModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
|
|
157
157
|
devtoolFallbackModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
|
|
158
158
|
} | undefined;
|
|
159
|
-
target?: false | "node" | "
|
|
159
|
+
target?: false | "node" | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | "async-node" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | "electron-main" | `electron${number}-main` | `electron${number}.${number}-main` | "electron-renderer" | `electron${number}-renderer` | `electron${number}.${number}-renderer` | "electron-preload" | `electron${number}-preload` | `electron${number}.${number}-preload` | ("node" | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | "async-node" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | "electron-main" | `electron${number}-main` | `electron${number}.${number}-main` | "electron-renderer" | `electron${number}-renderer` | `electron${number}.${number}-renderer` | "electron-preload" | `electron${number}-preload` | `electron${number}.${number}-preload`)[] | undefined;
|
|
160
160
|
mode?: "production" | "development" | "none" | undefined;
|
|
161
161
|
experiments?: {
|
|
162
162
|
lazyCompilation?: boolean | undefined;
|
|
@@ -168,7 +168,6 @@ export declare const config: {
|
|
|
168
168
|
futureDefaults?: boolean | undefined;
|
|
169
169
|
rspackFuture?: {
|
|
170
170
|
newTreeshaking?: boolean | undefined;
|
|
171
|
-
disableApplyEntryLazily?: boolean | undefined;
|
|
172
171
|
bundlerInfo?: {
|
|
173
172
|
version?: string | undefined;
|
|
174
173
|
force?: boolean | "version"[] | undefined;
|
|
@@ -179,7 +178,7 @@ export declare const config: {
|
|
|
179
178
|
context?: string | undefined;
|
|
180
179
|
dependencyType?: string | undefined;
|
|
181
180
|
request?: string | undefined;
|
|
182
|
-
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "
|
|
181
|
+
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "global" | "import" | "amd" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "jsonp" | "system" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
|
|
183
182
|
context?: string | undefined;
|
|
184
183
|
dependencyType?: string | undefined;
|
|
185
184
|
request?: string | undefined;
|
|
@@ -187,12 +186,12 @@ export declare const config: {
|
|
|
187
186
|
context?: string | undefined;
|
|
188
187
|
dependencyType?: string | undefined;
|
|
189
188
|
request?: string | undefined;
|
|
190
|
-
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "
|
|
189
|
+
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "global" | "import" | "amd" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "jsonp" | "system" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
|
|
191
190
|
context?: string | undefined;
|
|
192
191
|
dependencyType?: string | undefined;
|
|
193
192
|
request?: string | undefined;
|
|
194
193
|
}, ...args_1: unknown[]) => Promise<string | boolean | string[] | Record<string, string | string[]>>))[] | undefined;
|
|
195
|
-
externalsType?: "module" | "promise" | "script" | "commonjs" | "
|
|
194
|
+
externalsType?: "module" | "promise" | "script" | "commonjs" | "global" | "import" | "amd" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "jsonp" | "system" | "node-commonjs" | undefined;
|
|
196
195
|
externalsPresets?: {
|
|
197
196
|
node?: boolean | undefined;
|
|
198
197
|
web?: boolean | undefined;
|
|
@@ -541,7 +540,7 @@ export declare const config: {
|
|
|
541
540
|
devtoolModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
|
|
542
541
|
devtoolFallbackModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
|
|
543
542
|
} | undefined;
|
|
544
|
-
target?: false | "node" | "
|
|
543
|
+
target?: false | "node" | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | "async-node" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | "electron-main" | `electron${number}-main` | `electron${number}.${number}-main` | "electron-renderer" | `electron${number}-renderer` | `electron${number}.${number}-renderer` | "electron-preload" | `electron${number}-preload` | `electron${number}.${number}-preload` | ("node" | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | "async-node" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | "electron-main" | `electron${number}-main` | `electron${number}.${number}-main` | "electron-renderer" | `electron${number}-renderer` | `electron${number}.${number}-renderer` | "electron-preload" | `electron${number}-preload` | `electron${number}.${number}-preload`)[] | undefined;
|
|
545
544
|
mode?: "production" | "development" | "none" | undefined;
|
|
546
545
|
experiments?: {
|
|
547
546
|
lazyCompilation?: boolean | undefined;
|
|
@@ -553,7 +552,6 @@ export declare const config: {
|
|
|
553
552
|
futureDefaults?: boolean | undefined;
|
|
554
553
|
rspackFuture?: {
|
|
555
554
|
newTreeshaking?: boolean | undefined;
|
|
556
|
-
disableApplyEntryLazily?: boolean | undefined;
|
|
557
555
|
bundlerInfo?: {
|
|
558
556
|
version?: string | undefined;
|
|
559
557
|
force?: boolean | "version"[] | undefined;
|
|
@@ -564,7 +562,7 @@ export declare const config: {
|
|
|
564
562
|
context?: string | undefined;
|
|
565
563
|
dependencyType?: string | undefined;
|
|
566
564
|
request?: string | undefined;
|
|
567
|
-
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "
|
|
565
|
+
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "global" | "import" | "amd" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "jsonp" | "system" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
|
|
568
566
|
context?: string | undefined;
|
|
569
567
|
dependencyType?: string | undefined;
|
|
570
568
|
request?: string | undefined;
|
|
@@ -572,12 +570,12 @@ export declare const config: {
|
|
|
572
570
|
context?: string | undefined;
|
|
573
571
|
dependencyType?: string | undefined;
|
|
574
572
|
request?: string | undefined;
|
|
575
|
-
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "
|
|
573
|
+
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "global" | "import" | "amd" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "jsonp" | "system" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
|
|
576
574
|
context?: string | undefined;
|
|
577
575
|
dependencyType?: string | undefined;
|
|
578
576
|
request?: string | undefined;
|
|
579
577
|
}, ...args_1: unknown[]) => Promise<string | boolean | string[] | Record<string, string | string[]>>))[] | undefined;
|
|
580
|
-
externalsType?: "module" | "promise" | "script" | "commonjs" | "
|
|
578
|
+
externalsType?: "module" | "promise" | "script" | "commonjs" | "global" | "import" | "amd" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "jsonp" | "system" | "node-commonjs" | undefined;
|
|
581
579
|
externalsPresets?: {
|
|
582
580
|
node?: boolean | undefined;
|
|
583
581
|
web?: boolean | undefined;
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
9
|
*/
|
|
10
10
|
import { RspackOptionsNormalized, Compiler } from ".";
|
|
11
|
-
export declare function applyEntryOptions(compiler: Compiler, options: RspackOptionsNormalized): void;
|
|
12
11
|
export declare class RspackOptionsApply {
|
|
13
12
|
constructor();
|
|
14
13
|
process(options: RspackOptionsNormalized, compiler: Compiler): void;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.RspackOptionsApply =
|
|
6
|
+
exports.RspackOptionsApply = void 0;
|
|
7
7
|
const graceful_fs_1 = __importDefault(require("graceful-fs"));
|
|
8
8
|
const DefaultStatsFactoryPlugin_1 = require("./stats/DefaultStatsFactoryPlugin");
|
|
9
9
|
const DefaultStatsPrinterPlugin_1 = require("./stats/DefaultStatsPrinterPlugin");
|
|
@@ -12,21 +12,7 @@ const assert_1 = __importDefault(require("assert"));
|
|
|
12
12
|
const ignoreWarningsPlugin_1 = __importDefault(require("./lib/ignoreWarningsPlugin"));
|
|
13
13
|
const EntryOptionPlugin_1 = __importDefault(require("./lib/EntryOptionPlugin"));
|
|
14
14
|
const builtin_plugin_1 = require("./builtin-plugin");
|
|
15
|
-
const
|
|
16
|
-
function applyEntryOptions(compiler, options) {
|
|
17
|
-
if (!options.experiments.rspackFuture.disableApplyEntryLazily) {
|
|
18
|
-
(0, util_1.deprecatedWarn)(`You are depending on apply entry lazily (https://rspack.dev/config/experiments.html#experimentsrspackfuturedisableapplyentrylazily), this behavior has been deprecated, you can setup 'experiments.rspackFuture.disableApplyEntryLazily = true' to disable this behavior, and this will be enabled by default in v0.5`);
|
|
19
|
-
}
|
|
20
|
-
if (compiler.parentCompilation === undefined) {
|
|
21
|
-
if (options.experiments.rspackFuture.disableApplyEntryLazily) {
|
|
22
|
-
new EntryOptionPlugin_1.default().apply(compiler);
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
EntryOptionPlugin_1.default.applyEntryOption(compiler, compiler.context, options.entry);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
exports.applyEntryOptions = applyEntryOptions;
|
|
15
|
+
const assertNotNil_1 = require("./util/assertNotNil");
|
|
30
16
|
class RspackOptionsApply {
|
|
31
17
|
constructor() { }
|
|
32
18
|
process(options, compiler) {
|
|
@@ -140,10 +126,8 @@ class RspackOptionsApply {
|
|
|
140
126
|
if (options.experiments.css) {
|
|
141
127
|
new builtin_plugin_1.CssModulesPlugin().apply(compiler);
|
|
142
128
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
(0, assert_1.default)(options.context, "options.context should have value after `applyRspackOptionsDefaults`");
|
|
129
|
+
new EntryOptionPlugin_1.default().apply(compiler);
|
|
130
|
+
(0, assertNotNil_1.assertNotNill)(options.context);
|
|
147
131
|
compiler.hooks.entryOption.call(options.context, options.entry);
|
|
148
132
|
new builtin_plugin_1.RuntimePlugin().apply(compiler);
|
|
149
133
|
if (options.experiments.rspackFuture.bundlerInfo) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/core",
|
|
3
|
-
"version": "0.5.9-canary-
|
|
3
|
+
"version": "0.5.9-canary-6952f10-20240404010911",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "A Fast Rust-based Web Bundler",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"styled-components": "^6.0.8",
|
|
57
57
|
"terser": "5.27.2",
|
|
58
58
|
"wast-loader": "^1.11.4",
|
|
59
|
-
"@rspack/
|
|
60
|
-
"@rspack/
|
|
59
|
+
"@rspack/core": "0.5.9-canary-6952f10-20240404010911",
|
|
60
|
+
"@rspack/plugin-minify": "^0.5.9-canary-6952f10-20240404010911"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@module-federation/runtime-tools": "0.0.8",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"webpack-sources": "3.2.3",
|
|
73
73
|
"zod": "^3.21.4",
|
|
74
74
|
"zod-validation-error": "1.3.1",
|
|
75
|
-
"@rspack/binding": "0.5.9-canary-
|
|
75
|
+
"@rspack/binding": "0.5.9-canary-6952f10-20240404010911"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"@swc/helpers": ">=0.5.1"
|