@rspack/core 0.5.6 → 0.5.7-canary-dcd4782-20240312094134
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/ChunkGroup.d.ts +3 -1
- package/dist/ChunkGroup.js +6 -0
- package/dist/Compilation.d.ts +4 -5
- package/dist/Compilation.js +37 -52
- package/dist/Compiler.js +55 -53
- package/dist/Entrypoint.d.ts +8 -0
- package/dist/Entrypoint.js +21 -0
- package/dist/Watching.d.ts +1 -0
- package/dist/Watching.js +3 -0
- package/dist/builtin-plugin/index.d.ts +1 -0
- package/dist/builtin-plugin/index.js +1 -0
- package/dist/builtin-plugin/lazy-compilation/backend.d.ts +27 -0
- package/dist/builtin-plugin/lazy-compilation/backend.js +144 -0
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +30 -0
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.js +6 -0
- package/dist/builtin-plugin/lazy-compilation/plugin.d.ts +10 -0
- package/dist/builtin-plugin/lazy-compilation/plugin.js +57 -0
- package/dist/config/adapter.js +10 -3
- package/dist/config/adapterRuleUse.d.ts +1 -1
- package/dist/config/normalization.d.ts +3 -2
- package/dist/config/normalization.js +3 -1
- package/dist/config/zod.d.ts +93 -10
- package/dist/config/zod.js +15 -3
- package/dist/exports.d.ts +16 -4
- package/dist/lite-tapable/index.d.ts +34 -24
- package/dist/lite-tapable/index.js +173 -75
- package/dist/loader-runner/index.js +7 -5
- package/dist/rspackOptionsApply.js +9 -0
- package/dist/stats/DefaultStatsFactoryPlugin.js +3 -0
- package/dist/stats/statsFactoryUtils.d.ts +2 -1
- package/dist/util/fake.d.ts +0 -35
- package/dist/util/fake.js +1 -95
- package/package.json +7 -6
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BuiltinPluginName, RawRegexMatcher } from "@rspack/binding";
|
|
2
|
+
export declare const BuiltinLazyCompilationPlugin: {
|
|
3
|
+
new (module: (args: {
|
|
4
|
+
module: string;
|
|
5
|
+
path: string;
|
|
6
|
+
}) => {
|
|
7
|
+
active: boolean;
|
|
8
|
+
data: string;
|
|
9
|
+
client: string;
|
|
10
|
+
}, dispose: (callback: any) => void, entries: boolean, imports: boolean, test?: RawRegexMatcher | undefined): {
|
|
11
|
+
name: BuiltinPluginName;
|
|
12
|
+
_options: {
|
|
13
|
+
module: (args: {
|
|
14
|
+
module: string;
|
|
15
|
+
path: string;
|
|
16
|
+
}) => {
|
|
17
|
+
active: boolean;
|
|
18
|
+
data: string;
|
|
19
|
+
client: string;
|
|
20
|
+
};
|
|
21
|
+
dispose: (callback: any) => void;
|
|
22
|
+
imports: boolean;
|
|
23
|
+
entries: boolean;
|
|
24
|
+
test: RawRegexMatcher | undefined;
|
|
25
|
+
};
|
|
26
|
+
affectedHooks: "emit" | "done" | "compilation" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishModules" | "finishMake" | "entryOption" | undefined;
|
|
27
|
+
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
28
|
+
apply(compiler: import("../../Compiler").Compiler): void;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BuiltinLazyCompilationPlugin = void 0;
|
|
4
|
+
const binding_1 = require("@rspack/binding");
|
|
5
|
+
const base_1 = require("../base");
|
|
6
|
+
exports.BuiltinLazyCompilationPlugin = (0, base_1.create)(binding_1.BuiltinPluginName.LazyCompilation, (module, dispose, entries, imports, test) => ({ module, dispose, imports, entries, test }), "compilation");
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Compiler } from "../..";
|
|
2
|
+
import { RawRegexMatcher } from "@rspack/binding";
|
|
3
|
+
export default class LazyCompilationPlugin {
|
|
4
|
+
entries: boolean;
|
|
5
|
+
imports: boolean;
|
|
6
|
+
test?: RawRegexMatcher;
|
|
7
|
+
constructor(entries: boolean, imports: boolean, test?: RawRegexMatcher);
|
|
8
|
+
apply(compiler: Compiler): void;
|
|
9
|
+
}
|
|
10
|
+
export { LazyCompilationPlugin };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.LazyCompilationPlugin = void 0;
|
|
27
|
+
const lazyCompilation_1 = require("./lazyCompilation");
|
|
28
|
+
const backend_1 = __importStar(require("./backend"));
|
|
29
|
+
class LazyCompilationPlugin {
|
|
30
|
+
constructor(entries, imports, test) {
|
|
31
|
+
this.entries = entries;
|
|
32
|
+
this.imports = imports;
|
|
33
|
+
this.test = test;
|
|
34
|
+
}
|
|
35
|
+
apply(compiler) {
|
|
36
|
+
const backend = (0, backend_1.default)({
|
|
37
|
+
client: require.resolve(`../../../hot/lazy-compilation-${compiler.options.externalsPresets.node ? "node" : "web"}.js`)
|
|
38
|
+
});
|
|
39
|
+
new lazyCompilation_1.BuiltinLazyCompilationPlugin(backend_1.moduleImpl, backend_1.dispose, this.entries, this.imports, this.test).apply(compiler);
|
|
40
|
+
let initialized = false;
|
|
41
|
+
compiler.hooks.beforeCompile.tapAsync("LazyCompilationPlugin", (_params, callback) => {
|
|
42
|
+
if (initialized)
|
|
43
|
+
return callback();
|
|
44
|
+
backend(compiler, (err, result) => {
|
|
45
|
+
if (err)
|
|
46
|
+
return callback(err);
|
|
47
|
+
initialized = true;
|
|
48
|
+
callback();
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
compiler.hooks.shutdown.tapAsync("LazyCompilationPlugin", callback => {
|
|
52
|
+
(0, backend_1.dispose)(callback);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.default = LazyCompilationPlugin;
|
|
57
|
+
exports.LazyCompilationPlugin = LazyCompilationPlugin;
|
package/dist/config/adapter.js
CHANGED
|
@@ -64,7 +64,7 @@ function getRawTarget(target) {
|
|
|
64
64
|
}
|
|
65
65
|
return target;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function getRawExtensionAlias(alias = {}) {
|
|
68
68
|
const entries = Object.entries(alias).map(([key, value]) => {
|
|
69
69
|
if (Array.isArray(value)) {
|
|
70
70
|
return [key, value];
|
|
@@ -75,6 +75,12 @@ function getRawAlias(alias = {}) {
|
|
|
75
75
|
});
|
|
76
76
|
return Object.fromEntries(entries);
|
|
77
77
|
}
|
|
78
|
+
function getRawAlias(alias = {}) {
|
|
79
|
+
return Object.entries(alias).map(([key, value]) => ({
|
|
80
|
+
path: key,
|
|
81
|
+
redirect: Array.isArray(value) ? value : [value]
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
78
84
|
function getRawResolveByDependency(byDependency) {
|
|
79
85
|
if (byDependency === undefined)
|
|
80
86
|
return byDependency;
|
|
@@ -88,7 +94,7 @@ function getRawResolve(resolve) {
|
|
|
88
94
|
...resolve,
|
|
89
95
|
alias: getRawAlias(resolve.alias),
|
|
90
96
|
fallback: getRawAlias(resolve.fallback),
|
|
91
|
-
extensionAlias:
|
|
97
|
+
extensionAlias: getRawExtensionAlias(resolve.extensionAlias),
|
|
92
98
|
tsconfig: tsconfigConfigFile
|
|
93
99
|
? {
|
|
94
100
|
configFile: tsconfigConfigFile,
|
|
@@ -209,7 +215,8 @@ function getRawModule(module, options) {
|
|
|
209
215
|
return {
|
|
210
216
|
rules,
|
|
211
217
|
parser: getRawParserOptionsByModuleType(module.parser),
|
|
212
|
-
generator: getRawGeneratorOptionsByModuleType(module.generator)
|
|
218
|
+
generator: getRawGeneratorOptionsByModuleType(module.generator),
|
|
219
|
+
noParse: module.noParse
|
|
213
220
|
};
|
|
214
221
|
}
|
|
215
222
|
function tryMatch(payload, condition) {
|
|
@@ -49,7 +49,7 @@ export interface LoaderContext<OptionsType = {}> {
|
|
|
49
49
|
cacheable(cacheable?: boolean): void;
|
|
50
50
|
sourceMap: boolean;
|
|
51
51
|
rootContext: string;
|
|
52
|
-
context: string;
|
|
52
|
+
context: string | null;
|
|
53
53
|
loaderIndex: number;
|
|
54
54
|
remainingRequest: string;
|
|
55
55
|
currentRequest: string;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
9
|
*/
|
|
10
10
|
import { Compilation } from "..";
|
|
11
|
-
import type { Context, Dependencies, Node, DevTool, Externals, ExternalsPresets, ExternalsType, InfrastructureLogging, LibraryOptions, Mode, Name, Resolve, RspackOptions, Target, SnapshotOptions, CacheOptions, StatsValue, Optimization, Plugins, Watch, WatchOptions, DevServer, Profile, Bail, Builtins, EntryRuntime, ChunkLoading, PublicPath, EntryFilename, Path, Clean, Filename, ChunkFilename, CrossOriginLoading, CssFilename, CssChunkFilename, HotUpdateMainFilename, HotUpdateChunkFilename, AssetModuleFilename, UniqueName, ChunkLoadingGlobal, EnabledLibraryTypes, OutputModule, StrictModuleErrorHandling, GlobalObject, ImportFunctionName, Iife, WasmLoading, EnabledWasmLoadingTypes, WebassemblyModuleFilename, TrustedTypes, SourceMapFilename, HashDigest, HashDigestLength, HashFunction, HashSalt, WorkerPublicPath, RuleSetRules, ParserOptionsByModuleType, GeneratorOptionsByModuleType, RspackFutureOptions, HotUpdateGlobal, ScriptType, DevtoolNamespace, DevtoolModuleFilenameTemplate, DevtoolFallbackModuleFilenameTemplate } from "./zod";
|
|
11
|
+
import type { Context, Dependencies, Node, DevTool, Externals, ExternalsPresets, ExternalsType, InfrastructureLogging, LibraryOptions, Mode, Name, Resolve, RspackOptions, Target, SnapshotOptions, CacheOptions, StatsValue, Optimization, Plugins, Watch, WatchOptions, DevServer, Profile, Bail, Builtins, EntryRuntime, ChunkLoading, PublicPath, EntryFilename, Path, Clean, Filename, ChunkFilename, CrossOriginLoading, CssFilename, CssChunkFilename, HotUpdateMainFilename, HotUpdateChunkFilename, AssetModuleFilename, UniqueName, ChunkLoadingGlobal, EnabledLibraryTypes, OutputModule, StrictModuleErrorHandling, GlobalObject, ImportFunctionName, Iife, WasmLoading, EnabledWasmLoadingTypes, WebassemblyModuleFilename, TrustedTypes, SourceMapFilename, HashDigest, HashDigestLength, HashFunction, HashSalt, WorkerPublicPath, RuleSetRules, ParserOptionsByModuleType, GeneratorOptionsByModuleType, RspackFutureOptions, HotUpdateGlobal, ScriptType, NoParseOption, DevtoolNamespace, DevtoolModuleFilenameTemplate, DevtoolFallbackModuleFilenameTemplate, LazyCompilationOptions } from "./zod";
|
|
12
12
|
export declare const getNormalizedRspackOptions: (config: RspackOptions) => RspackOptionsNormalized;
|
|
13
13
|
export type EntryNormalized = EntryStaticNormalized;
|
|
14
14
|
export interface EntryStaticNormalized {
|
|
@@ -72,9 +72,10 @@ export interface ModuleOptionsNormalized {
|
|
|
72
72
|
rules: RuleSetRules;
|
|
73
73
|
parser: ParserOptionsByModuleType;
|
|
74
74
|
generator: GeneratorOptionsByModuleType;
|
|
75
|
+
noParse?: NoParseOption;
|
|
75
76
|
}
|
|
76
77
|
export interface ExperimentsNormalized {
|
|
77
|
-
lazyCompilation?:
|
|
78
|
+
lazyCompilation?: false | LazyCompilationOptions;
|
|
78
79
|
asyncWebAssembly?: boolean;
|
|
79
80
|
outputModule?: boolean;
|
|
80
81
|
newSplitChunks?: boolean;
|
|
@@ -125,6 +125,7 @@ const getNormalizedRspackOptions = (config) => {
|
|
|
125
125
|
...resolve
|
|
126
126
|
})),
|
|
127
127
|
module: nestedConfig(config.module, module => ({
|
|
128
|
+
noParse: module.noParse,
|
|
128
129
|
parser: keyedNestedConfig(module.parser, cloneObject, {}),
|
|
129
130
|
generator: keyedNestedConfig(module.generator, cloneObject, {}),
|
|
130
131
|
defaultRules: optionalNestedArray(module.defaultRules, r => [...r]),
|
|
@@ -182,7 +183,8 @@ const getNormalizedRspackOptions = (config) => {
|
|
|
182
183
|
}),
|
|
183
184
|
plugins: nestedArray(config.plugins, p => [...p]),
|
|
184
185
|
experiments: nestedConfig(config.experiments, experiments => ({
|
|
185
|
-
...experiments
|
|
186
|
+
...experiments,
|
|
187
|
+
lazyCompilation: optionalNestedConfig(experiments.lazyCompilation, options => (options === true ? {} : options))
|
|
186
188
|
})),
|
|
187
189
|
watch: config.watch,
|
|
188
190
|
watchOptions: cloneObject(config.watchOptions),
|
package/dist/config/zod.d.ts
CHANGED
|
@@ -1923,6 +1923,8 @@ declare const generatorOptionsByModuleType: z.ZodUnion<[z.ZodObject<{
|
|
|
1923
1923
|
} | undefined;
|
|
1924
1924
|
}>, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>]>;
|
|
1925
1925
|
export type GeneratorOptionsByModuleType = z.infer<typeof generatorOptionsByModuleType>;
|
|
1926
|
+
declare const noParseOption: 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">]>;
|
|
1927
|
+
export type NoParseOption = z.infer<typeof noParseOption>;
|
|
1926
1928
|
declare const moduleOptions: z.ZodObject<{
|
|
1927
1929
|
defaultRules: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"...">, z.ZodType<RuleSetRule, z.ZodTypeDef, RuleSetRule>]>, z.ZodUnion<[z.ZodLiteral<false>, z.ZodLiteral<0>, z.ZodLiteral<"">, z.ZodNull, z.ZodUndefined]>]>, "many">>;
|
|
1928
1930
|
rules: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"...">, z.ZodType<RuleSetRule, z.ZodTypeDef, RuleSetRule>]>, z.ZodUnion<[z.ZodLiteral<false>, z.ZodLiteral<0>, z.ZodLiteral<"">, z.ZodNull, z.ZodUndefined]>]>, "many">>;
|
|
@@ -2085,6 +2087,7 @@ declare const moduleOptions: z.ZodObject<{
|
|
|
2085
2087
|
publicPath?: string | undefined;
|
|
2086
2088
|
} | undefined;
|
|
2087
2089
|
}>, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>]>>;
|
|
2090
|
+
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">]>>;
|
|
2088
2091
|
}, "strict", z.ZodTypeAny, {
|
|
2089
2092
|
defaultRules?: (false | "" | 0 | "..." | RuleSetRule | null | undefined)[] | undefined;
|
|
2090
2093
|
rules?: (false | "" | 0 | "..." | RuleSetRule | null | undefined)[] | undefined;
|
|
@@ -2121,6 +2124,7 @@ declare const moduleOptions: z.ZodObject<{
|
|
|
2121
2124
|
publicPath?: string | undefined;
|
|
2122
2125
|
} | undefined;
|
|
2123
2126
|
} | undefined;
|
|
2127
|
+
noParse?: string | RegExp | ((args_0: string, ...args_1: unknown[]) => boolean) | (string | RegExp | ((args_0: string, ...args_1: unknown[]) => boolean))[] | undefined;
|
|
2124
2128
|
}, {
|
|
2125
2129
|
defaultRules?: (false | "" | 0 | "..." | RuleSetRule | null | undefined)[] | undefined;
|
|
2126
2130
|
rules?: (false | "" | 0 | "..." | RuleSetRule | null | undefined)[] | undefined;
|
|
@@ -2157,6 +2161,7 @@ declare const moduleOptions: z.ZodObject<{
|
|
|
2157
2161
|
publicPath?: string | undefined;
|
|
2158
2162
|
} | undefined;
|
|
2159
2163
|
} | undefined;
|
|
2164
|
+
noParse?: string | RegExp | ((args_0: string, ...args_1: unknown[]) => boolean) | (string | RegExp | ((args_0: string, ...args_1: unknown[]) => boolean))[] | undefined;
|
|
2160
2165
|
}>;
|
|
2161
2166
|
export type ModuleOptions = z.infer<typeof moduleOptions>;
|
|
2162
2167
|
declare const target: z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<false>, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodEnum<["web", "webworker", "es3", "es5", "es2015", "es2016", "es2017", "es2018", "es2019", "es2020", "es2021", "es2022", "browserslist"]>, z.ZodLiteral<"node">]>, z.ZodLiteral<"async-node">]>, z.ZodType<`node${number}`, z.ZodTypeDef, `node${number}`>]>, z.ZodType<`async-node${number}`, z.ZodTypeDef, `async-node${number}`>]>, z.ZodType<`node${number}.${number}`, z.ZodTypeDef, `node${number}.${number}`>]>, z.ZodType<`async-node${number}.${number}`, z.ZodTypeDef, `async-node${number}.${number}`>]>, z.ZodLiteral<"electron-main">]>, z.ZodType<`electron${number}-main`, z.ZodTypeDef, `electron${number}-main`>]>, z.ZodType<`electron${number}.${number}-main`, z.ZodTypeDef, `electron${number}.${number}-main`>]>, z.ZodLiteral<"electron-renderer">]>, z.ZodType<`electron${number}-renderer`, z.ZodTypeDef, `electron${number}-renderer`>]>, z.ZodType<`electron${number}.${number}-renderer`, z.ZodTypeDef, `electron${number}.${number}-renderer`>]>, z.ZodLiteral<"electron-preload">]>, z.ZodType<`electron${number}-preload`, z.ZodTypeDef, `electron${number}-preload`>]>, z.ZodType<`electron${number}.${number}-preload`, z.ZodTypeDef, `electron${number}.${number}-preload`>]>]>, z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodEnum<["web", "webworker", "es3", "es5", "es2015", "es2016", "es2017", "es2018", "es2019", "es2020", "es2021", "es2022", "browserslist"]>, z.ZodLiteral<"node">]>, z.ZodLiteral<"async-node">]>, z.ZodType<`node${number}`, z.ZodTypeDef, `node${number}`>]>, z.ZodType<`async-node${number}`, z.ZodTypeDef, `async-node${number}`>]>, z.ZodType<`node${number}.${number}`, z.ZodTypeDef, `node${number}.${number}`>]>, z.ZodType<`async-node${number}.${number}`, z.ZodTypeDef, `async-node${number}.${number}`>]>, z.ZodLiteral<"electron-main">]>, z.ZodType<`electron${number}-main`, z.ZodTypeDef, `electron${number}-main`>]>, z.ZodType<`electron${number}.${number}-main`, z.ZodTypeDef, `electron${number}.${number}-main`>]>, z.ZodLiteral<"electron-renderer">]>, z.ZodType<`electron${number}-renderer`, z.ZodTypeDef, `electron${number}-renderer`>]>, z.ZodType<`electron${number}.${number}-renderer`, z.ZodTypeDef, `electron${number}.${number}-renderer`>]>, z.ZodLiteral<"electron-preload">]>, z.ZodType<`electron${number}-preload`, z.ZodTypeDef, `electron${number}-preload`>]>, z.ZodType<`electron${number}.${number}-preload`, z.ZodTypeDef, `electron${number}.${number}-preload`>]>, "many">]>;
|
|
@@ -2417,6 +2422,7 @@ declare const statsOptions: z.ZodObject<{
|
|
|
2417
2422
|
children: z.ZodOptional<z.ZodBoolean>;
|
|
2418
2423
|
usedExports: z.ZodOptional<z.ZodBoolean>;
|
|
2419
2424
|
providedExports: z.ZodOptional<z.ZodBoolean>;
|
|
2425
|
+
optimizationBailout: z.ZodOptional<z.ZodBoolean>;
|
|
2420
2426
|
}, "strict", z.ZodTypeAny, {
|
|
2421
2427
|
all?: boolean | undefined;
|
|
2422
2428
|
preset?: "none" | "normal" | "verbose" | "errors-only" | "errors-warnings" | undefined;
|
|
@@ -2451,6 +2457,7 @@ declare const statsOptions: z.ZodObject<{
|
|
|
2451
2457
|
children?: boolean | undefined;
|
|
2452
2458
|
usedExports?: boolean | undefined;
|
|
2453
2459
|
providedExports?: boolean | undefined;
|
|
2460
|
+
optimizationBailout?: boolean | undefined;
|
|
2454
2461
|
}, {
|
|
2455
2462
|
all?: boolean | undefined;
|
|
2456
2463
|
preset?: "none" | "normal" | "verbose" | "errors-only" | "errors-warnings" | undefined;
|
|
@@ -2485,6 +2492,7 @@ declare const statsOptions: z.ZodObject<{
|
|
|
2485
2492
|
children?: boolean | undefined;
|
|
2486
2493
|
usedExports?: boolean | undefined;
|
|
2487
2494
|
providedExports?: boolean | undefined;
|
|
2495
|
+
optimizationBailout?: boolean | undefined;
|
|
2488
2496
|
}>;
|
|
2489
2497
|
export type StatsOptions = z.infer<typeof statsOptions>;
|
|
2490
2498
|
declare const statsValue: z.ZodUnion<[z.ZodUnion<[z.ZodEnum<["none", "errors-only", "errors-warnings", "normal", "verbose"]>, z.ZodBoolean]>, z.ZodObject<{
|
|
@@ -2521,6 +2529,7 @@ declare const statsValue: z.ZodUnion<[z.ZodUnion<[z.ZodEnum<["none", "errors-onl
|
|
|
2521
2529
|
children: z.ZodOptional<z.ZodBoolean>;
|
|
2522
2530
|
usedExports: z.ZodOptional<z.ZodBoolean>;
|
|
2523
2531
|
providedExports: z.ZodOptional<z.ZodBoolean>;
|
|
2532
|
+
optimizationBailout: z.ZodOptional<z.ZodBoolean>;
|
|
2524
2533
|
}, "strict", z.ZodTypeAny, {
|
|
2525
2534
|
all?: boolean | undefined;
|
|
2526
2535
|
preset?: "none" | "normal" | "verbose" | "errors-only" | "errors-warnings" | undefined;
|
|
@@ -2555,6 +2564,7 @@ declare const statsValue: z.ZodUnion<[z.ZodUnion<[z.ZodEnum<["none", "errors-onl
|
|
|
2555
2564
|
children?: boolean | undefined;
|
|
2556
2565
|
usedExports?: boolean | undefined;
|
|
2557
2566
|
providedExports?: boolean | undefined;
|
|
2567
|
+
optimizationBailout?: boolean | undefined;
|
|
2558
2568
|
}, {
|
|
2559
2569
|
all?: boolean | undefined;
|
|
2560
2570
|
preset?: "none" | "normal" | "verbose" | "errors-only" | "errors-warnings" | undefined;
|
|
@@ -2589,6 +2599,7 @@ declare const statsValue: z.ZodUnion<[z.ZodUnion<[z.ZodEnum<["none", "errors-onl
|
|
|
2589
2599
|
children?: boolean | undefined;
|
|
2590
2600
|
usedExports?: boolean | undefined;
|
|
2591
2601
|
providedExports?: boolean | undefined;
|
|
2602
|
+
optimizationBailout?: boolean | undefined;
|
|
2592
2603
|
}>]>;
|
|
2593
2604
|
export type StatsValue = z.infer<typeof statsValue>;
|
|
2594
2605
|
export interface RspackPluginInstance {
|
|
@@ -3143,8 +3154,34 @@ declare const rspackFutureOptions: z.ZodObject<{
|
|
|
3143
3154
|
} | undefined;
|
|
3144
3155
|
}>;
|
|
3145
3156
|
export type RspackFutureOptions = z.infer<typeof rspackFutureOptions>;
|
|
3157
|
+
declare const lazyCompilationOptions: z.ZodObject<{
|
|
3158
|
+
imports: z.ZodOptional<z.ZodBoolean>;
|
|
3159
|
+
entries: z.ZodOptional<z.ZodBoolean>;
|
|
3160
|
+
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
|
|
3161
|
+
}, "strip", z.ZodTypeAny, {
|
|
3162
|
+
imports?: boolean | undefined;
|
|
3163
|
+
entries?: boolean | undefined;
|
|
3164
|
+
test?: RegExp | undefined;
|
|
3165
|
+
}, {
|
|
3166
|
+
imports?: boolean | undefined;
|
|
3167
|
+
entries?: boolean | undefined;
|
|
3168
|
+
test?: RegExp | undefined;
|
|
3169
|
+
}>;
|
|
3170
|
+
export type LazyCompilationOptions = z.infer<typeof lazyCompilationOptions>;
|
|
3146
3171
|
declare const experiments: z.ZodObject<{
|
|
3147
|
-
lazyCompilation: z.ZodOptional<z.ZodBoolean
|
|
3172
|
+
lazyCompilation: z.ZodUnion<[z.ZodOptional<z.ZodBoolean>, z.ZodObject<{
|
|
3173
|
+
imports: z.ZodOptional<z.ZodBoolean>;
|
|
3174
|
+
entries: z.ZodOptional<z.ZodBoolean>;
|
|
3175
|
+
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
|
|
3176
|
+
}, "strip", z.ZodTypeAny, {
|
|
3177
|
+
imports?: boolean | undefined;
|
|
3178
|
+
entries?: boolean | undefined;
|
|
3179
|
+
test?: RegExp | undefined;
|
|
3180
|
+
}, {
|
|
3181
|
+
imports?: boolean | undefined;
|
|
3182
|
+
entries?: boolean | undefined;
|
|
3183
|
+
test?: RegExp | undefined;
|
|
3184
|
+
}>]>;
|
|
3148
3185
|
asyncWebAssembly: z.ZodOptional<z.ZodBoolean>;
|
|
3149
3186
|
outputModule: z.ZodOptional<z.ZodBoolean>;
|
|
3150
3187
|
topLevelAwait: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3180,7 +3217,11 @@ declare const experiments: z.ZodObject<{
|
|
|
3180
3217
|
} | undefined;
|
|
3181
3218
|
}>>;
|
|
3182
3219
|
}, "strict", z.ZodTypeAny, {
|
|
3183
|
-
lazyCompilation?: boolean |
|
|
3220
|
+
lazyCompilation?: boolean | {
|
|
3221
|
+
imports?: boolean | undefined;
|
|
3222
|
+
entries?: boolean | undefined;
|
|
3223
|
+
test?: RegExp | undefined;
|
|
3224
|
+
} | undefined;
|
|
3184
3225
|
asyncWebAssembly?: boolean | undefined;
|
|
3185
3226
|
outputModule?: boolean | undefined;
|
|
3186
3227
|
topLevelAwait?: boolean | undefined;
|
|
@@ -3196,7 +3237,11 @@ declare const experiments: z.ZodObject<{
|
|
|
3196
3237
|
} | undefined;
|
|
3197
3238
|
} | undefined;
|
|
3198
3239
|
}, {
|
|
3199
|
-
lazyCompilation?: boolean |
|
|
3240
|
+
lazyCompilation?: boolean | {
|
|
3241
|
+
imports?: boolean | undefined;
|
|
3242
|
+
entries?: boolean | undefined;
|
|
3243
|
+
test?: RegExp | undefined;
|
|
3244
|
+
} | undefined;
|
|
3200
3245
|
asyncWebAssembly?: boolean | undefined;
|
|
3201
3246
|
outputModule?: boolean | undefined;
|
|
3202
3247
|
topLevelAwait?: boolean | undefined;
|
|
@@ -3678,7 +3723,19 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
3678
3723
|
target: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<false>, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodEnum<["web", "webworker", "es3", "es5", "es2015", "es2016", "es2017", "es2018", "es2019", "es2020", "es2021", "es2022", "browserslist"]>, z.ZodLiteral<"node">]>, z.ZodLiteral<"async-node">]>, z.ZodType<`node${number}`, z.ZodTypeDef, `node${number}`>]>, z.ZodType<`async-node${number}`, z.ZodTypeDef, `async-node${number}`>]>, z.ZodType<`node${number}.${number}`, z.ZodTypeDef, `node${number}.${number}`>]>, z.ZodType<`async-node${number}.${number}`, z.ZodTypeDef, `async-node${number}.${number}`>]>, z.ZodLiteral<"electron-main">]>, z.ZodType<`electron${number}-main`, z.ZodTypeDef, `electron${number}-main`>]>, z.ZodType<`electron${number}.${number}-main`, z.ZodTypeDef, `electron${number}.${number}-main`>]>, z.ZodLiteral<"electron-renderer">]>, z.ZodType<`electron${number}-renderer`, z.ZodTypeDef, `electron${number}-renderer`>]>, z.ZodType<`electron${number}.${number}-renderer`, z.ZodTypeDef, `electron${number}.${number}-renderer`>]>, z.ZodLiteral<"electron-preload">]>, z.ZodType<`electron${number}-preload`, z.ZodTypeDef, `electron${number}-preload`>]>, z.ZodType<`electron${number}.${number}-preload`, z.ZodTypeDef, `electron${number}.${number}-preload`>]>]>, z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodEnum<["web", "webworker", "es3", "es5", "es2015", "es2016", "es2017", "es2018", "es2019", "es2020", "es2021", "es2022", "browserslist"]>, z.ZodLiteral<"node">]>, z.ZodLiteral<"async-node">]>, z.ZodType<`node${number}`, z.ZodTypeDef, `node${number}`>]>, z.ZodType<`async-node${number}`, z.ZodTypeDef, `async-node${number}`>]>, z.ZodType<`node${number}.${number}`, z.ZodTypeDef, `node${number}.${number}`>]>, z.ZodType<`async-node${number}.${number}`, z.ZodTypeDef, `async-node${number}.${number}`>]>, z.ZodLiteral<"electron-main">]>, z.ZodType<`electron${number}-main`, z.ZodTypeDef, `electron${number}-main`>]>, z.ZodType<`electron${number}.${number}-main`, z.ZodTypeDef, `electron${number}.${number}-main`>]>, z.ZodLiteral<"electron-renderer">]>, z.ZodType<`electron${number}-renderer`, z.ZodTypeDef, `electron${number}-renderer`>]>, z.ZodType<`electron${number}.${number}-renderer`, z.ZodTypeDef, `electron${number}.${number}-renderer`>]>, z.ZodLiteral<"electron-preload">]>, z.ZodType<`electron${number}-preload`, z.ZodTypeDef, `electron${number}-preload`>]>, z.ZodType<`electron${number}.${number}-preload`, z.ZodTypeDef, `electron${number}.${number}-preload`>]>, "many">]>>;
|
|
3679
3724
|
mode: z.ZodOptional<z.ZodEnum<["development", "production", "none"]>>;
|
|
3680
3725
|
experiments: z.ZodOptional<z.ZodObject<{
|
|
3681
|
-
lazyCompilation: z.ZodOptional<z.ZodBoolean
|
|
3726
|
+
lazyCompilation: z.ZodUnion<[z.ZodOptional<z.ZodBoolean>, z.ZodObject<{
|
|
3727
|
+
imports: z.ZodOptional<z.ZodBoolean>;
|
|
3728
|
+
entries: z.ZodOptional<z.ZodBoolean>;
|
|
3729
|
+
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
|
|
3730
|
+
}, "strip", z.ZodTypeAny, {
|
|
3731
|
+
imports?: boolean | undefined;
|
|
3732
|
+
entries?: boolean | undefined;
|
|
3733
|
+
test?: RegExp | undefined;
|
|
3734
|
+
}, {
|
|
3735
|
+
imports?: boolean | undefined;
|
|
3736
|
+
entries?: boolean | undefined;
|
|
3737
|
+
test?: RegExp | undefined;
|
|
3738
|
+
}>]>;
|
|
3682
3739
|
asyncWebAssembly: z.ZodOptional<z.ZodBoolean>;
|
|
3683
3740
|
outputModule: z.ZodOptional<z.ZodBoolean>;
|
|
3684
3741
|
topLevelAwait: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3714,7 +3771,11 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
3714
3771
|
} | undefined;
|
|
3715
3772
|
}>>;
|
|
3716
3773
|
}, "strict", z.ZodTypeAny, {
|
|
3717
|
-
lazyCompilation?: boolean |
|
|
3774
|
+
lazyCompilation?: boolean | {
|
|
3775
|
+
imports?: boolean | undefined;
|
|
3776
|
+
entries?: boolean | undefined;
|
|
3777
|
+
test?: RegExp | undefined;
|
|
3778
|
+
} | undefined;
|
|
3718
3779
|
asyncWebAssembly?: boolean | undefined;
|
|
3719
3780
|
outputModule?: boolean | undefined;
|
|
3720
3781
|
topLevelAwait?: boolean | undefined;
|
|
@@ -3730,7 +3791,11 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
3730
3791
|
} | undefined;
|
|
3731
3792
|
} | undefined;
|
|
3732
3793
|
}, {
|
|
3733
|
-
lazyCompilation?: boolean |
|
|
3794
|
+
lazyCompilation?: boolean | {
|
|
3795
|
+
imports?: boolean | undefined;
|
|
3796
|
+
entries?: boolean | undefined;
|
|
3797
|
+
test?: RegExp | undefined;
|
|
3798
|
+
} | undefined;
|
|
3734
3799
|
asyncWebAssembly?: boolean | undefined;
|
|
3735
3800
|
outputModule?: boolean | undefined;
|
|
3736
3801
|
topLevelAwait?: boolean | undefined;
|
|
@@ -3914,6 +3979,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
3914
3979
|
children: z.ZodOptional<z.ZodBoolean>;
|
|
3915
3980
|
usedExports: z.ZodOptional<z.ZodBoolean>;
|
|
3916
3981
|
providedExports: z.ZodOptional<z.ZodBoolean>;
|
|
3982
|
+
optimizationBailout: z.ZodOptional<z.ZodBoolean>;
|
|
3917
3983
|
}, "strict", z.ZodTypeAny, {
|
|
3918
3984
|
all?: boolean | undefined;
|
|
3919
3985
|
preset?: "none" | "normal" | "verbose" | "errors-only" | "errors-warnings" | undefined;
|
|
@@ -3948,6 +4014,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
3948
4014
|
children?: boolean | undefined;
|
|
3949
4015
|
usedExports?: boolean | undefined;
|
|
3950
4016
|
providedExports?: boolean | undefined;
|
|
4017
|
+
optimizationBailout?: boolean | undefined;
|
|
3951
4018
|
}, {
|
|
3952
4019
|
all?: boolean | undefined;
|
|
3953
4020
|
preset?: "none" | "normal" | "verbose" | "errors-only" | "errors-warnings" | undefined;
|
|
@@ -3982,6 +4049,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
3982
4049
|
children?: boolean | undefined;
|
|
3983
4050
|
usedExports?: boolean | undefined;
|
|
3984
4051
|
providedExports?: boolean | undefined;
|
|
4052
|
+
optimizationBailout?: boolean | undefined;
|
|
3985
4053
|
}>]>>;
|
|
3986
4054
|
snapshot: z.ZodOptional<z.ZodObject<{
|
|
3987
4055
|
module: z.ZodOptional<z.ZodObject<{
|
|
@@ -4486,6 +4554,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
4486
4554
|
publicPath?: string | undefined;
|
|
4487
4555
|
} | undefined;
|
|
4488
4556
|
}>, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>]>>;
|
|
4557
|
+
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">]>>;
|
|
4489
4558
|
}, "strict", z.ZodTypeAny, {
|
|
4490
4559
|
defaultRules?: (false | "" | 0 | "..." | RuleSetRule | null | undefined)[] | undefined;
|
|
4491
4560
|
rules?: (false | "" | 0 | "..." | RuleSetRule | null | undefined)[] | undefined;
|
|
@@ -4522,6 +4591,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
4522
4591
|
publicPath?: string | undefined;
|
|
4523
4592
|
} | undefined;
|
|
4524
4593
|
} | undefined;
|
|
4594
|
+
noParse?: string | RegExp | ((args_0: string, ...args_1: unknown[]) => boolean) | (string | RegExp | ((args_0: string, ...args_1: unknown[]) => boolean))[] | undefined;
|
|
4525
4595
|
}, {
|
|
4526
4596
|
defaultRules?: (false | "" | 0 | "..." | RuleSetRule | null | undefined)[] | undefined;
|
|
4527
4597
|
rules?: (false | "" | 0 | "..." | RuleSetRule | null | undefined)[] | undefined;
|
|
@@ -4558,6 +4628,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
4558
4628
|
publicPath?: string | undefined;
|
|
4559
4629
|
} | undefined;
|
|
4560
4630
|
} | undefined;
|
|
4631
|
+
noParse?: string | RegExp | ((args_0: string, ...args_1: unknown[]) => boolean) | (string | RegExp | ((args_0: string, ...args_1: unknown[]) => boolean))[] | undefined;
|
|
4561
4632
|
}>>;
|
|
4562
4633
|
profile: z.ZodOptional<z.ZodBoolean>;
|
|
4563
4634
|
bail: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -4667,10 +4738,14 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
4667
4738
|
devtoolModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
|
|
4668
4739
|
devtoolFallbackModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
|
|
4669
4740
|
} | undefined;
|
|
4670
|
-
target?: false | "node" | "async-node" | "
|
|
4741
|
+
target?: false | "node" | "async-node" | "web" | "es5" | "webworker" | "es3" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | `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" | "async-node" | "web" | "es5" | "webworker" | "es3" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | `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;
|
|
4671
4742
|
mode?: "production" | "development" | "none" | undefined;
|
|
4672
4743
|
experiments?: {
|
|
4673
|
-
lazyCompilation?: boolean |
|
|
4744
|
+
lazyCompilation?: boolean | {
|
|
4745
|
+
imports?: boolean | undefined;
|
|
4746
|
+
entries?: boolean | undefined;
|
|
4747
|
+
test?: RegExp | undefined;
|
|
4748
|
+
} | undefined;
|
|
4674
4749
|
asyncWebAssembly?: boolean | undefined;
|
|
4675
4750
|
outputModule?: boolean | undefined;
|
|
4676
4751
|
topLevelAwait?: boolean | undefined;
|
|
@@ -4772,6 +4847,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
4772
4847
|
children?: boolean | undefined;
|
|
4773
4848
|
usedExports?: boolean | undefined;
|
|
4774
4849
|
providedExports?: boolean | undefined;
|
|
4850
|
+
optimizationBailout?: boolean | undefined;
|
|
4775
4851
|
} | undefined;
|
|
4776
4852
|
snapshot?: {
|
|
4777
4853
|
module?: {
|
|
@@ -4882,6 +4958,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
4882
4958
|
publicPath?: string | undefined;
|
|
4883
4959
|
} | undefined;
|
|
4884
4960
|
} | undefined;
|
|
4961
|
+
noParse?: string | RegExp | ((args_0: string, ...args_1: unknown[]) => boolean) | (string | RegExp | ((args_0: string, ...args_1: unknown[]) => boolean))[] | undefined;
|
|
4885
4962
|
} | undefined;
|
|
4886
4963
|
profile?: boolean | undefined;
|
|
4887
4964
|
bail?: boolean | undefined;
|
|
@@ -4991,10 +5068,14 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
4991
5068
|
devtoolModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
|
|
4992
5069
|
devtoolFallbackModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
|
|
4993
5070
|
} | undefined;
|
|
4994
|
-
target?: false | "node" | "async-node" | "
|
|
5071
|
+
target?: false | "node" | "async-node" | "web" | "es5" | "webworker" | "es3" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | `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" | "async-node" | "web" | "es5" | "webworker" | "es3" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | `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;
|
|
4995
5072
|
mode?: "production" | "development" | "none" | undefined;
|
|
4996
5073
|
experiments?: {
|
|
4997
|
-
lazyCompilation?: boolean |
|
|
5074
|
+
lazyCompilation?: boolean | {
|
|
5075
|
+
imports?: boolean | undefined;
|
|
5076
|
+
entries?: boolean | undefined;
|
|
5077
|
+
test?: RegExp | undefined;
|
|
5078
|
+
} | undefined;
|
|
4998
5079
|
asyncWebAssembly?: boolean | undefined;
|
|
4999
5080
|
outputModule?: boolean | undefined;
|
|
5000
5081
|
topLevelAwait?: boolean | undefined;
|
|
@@ -5096,6 +5177,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
5096
5177
|
children?: boolean | undefined;
|
|
5097
5178
|
usedExports?: boolean | undefined;
|
|
5098
5179
|
providedExports?: boolean | undefined;
|
|
5180
|
+
optimizationBailout?: boolean | undefined;
|
|
5099
5181
|
} | undefined;
|
|
5100
5182
|
snapshot?: {
|
|
5101
5183
|
module?: {
|
|
@@ -5206,6 +5288,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
5206
5288
|
publicPath?: string | undefined;
|
|
5207
5289
|
} | undefined;
|
|
5208
5290
|
} | undefined;
|
|
5291
|
+
noParse?: string | RegExp | ((args_0: string, ...args_1: unknown[]) => boolean) | (string | RegExp | ((args_0: string, ...args_1: unknown[]) => boolean))[] | undefined;
|
|
5209
5292
|
} | undefined;
|
|
5210
5293
|
profile?: boolean | undefined;
|
|
5211
5294
|
bail?: boolean | undefined;
|
package/dist/config/zod.js
CHANGED
|
@@ -345,11 +345,17 @@ const generatorOptionsByModuleTypeKnown = zod_1.z.strictObject({
|
|
|
345
345
|
});
|
|
346
346
|
const generatorOptionsByModuleTypeUnknown = zod_1.z.record(zod_1.z.record(zod_1.z.any()));
|
|
347
347
|
const generatorOptionsByModuleType = generatorOptionsByModuleTypeKnown.or(generatorOptionsByModuleTypeUnknown);
|
|
348
|
+
const noParseOptionSingle = zod_1.z
|
|
349
|
+
.string()
|
|
350
|
+
.or(zod_1.z.instanceof(RegExp))
|
|
351
|
+
.or(zod_1.z.function().args(zod_1.z.string()).returns(zod_1.z.boolean()));
|
|
352
|
+
const noParseOption = noParseOptionSingle.or(zod_1.z.array(noParseOptionSingle));
|
|
348
353
|
const moduleOptions = zod_1.z.strictObject({
|
|
349
354
|
defaultRules: ruleSetRules.optional(),
|
|
350
355
|
rules: ruleSetRules.optional(),
|
|
351
356
|
parser: parserOptionsByModuleType.optional(),
|
|
352
|
-
generator: generatorOptionsByModuleType.optional()
|
|
357
|
+
generator: generatorOptionsByModuleType.optional(),
|
|
358
|
+
noParse: noParseOption.optional()
|
|
353
359
|
});
|
|
354
360
|
//#endregion
|
|
355
361
|
//#region Target
|
|
@@ -568,7 +574,8 @@ const statsOptions = zod_1.z.strictObject({
|
|
|
568
574
|
runtimeModules: zod_1.z.boolean().optional(),
|
|
569
575
|
children: zod_1.z.boolean().optional(),
|
|
570
576
|
usedExports: zod_1.z.boolean().optional(),
|
|
571
|
-
providedExports: zod_1.z.boolean().optional()
|
|
577
|
+
providedExports: zod_1.z.boolean().optional(),
|
|
578
|
+
optimizationBailout: zod_1.z.boolean().optional()
|
|
572
579
|
});
|
|
573
580
|
const statsValue = zod_1.z
|
|
574
581
|
.enum(["none", "errors-only", "errors-warnings", "normal", "verbose"])
|
|
@@ -683,8 +690,13 @@ const rspackFutureOptions = zod_1.z.strictObject({
|
|
|
683
690
|
})
|
|
684
691
|
.optional()
|
|
685
692
|
});
|
|
693
|
+
const lazyCompilationOptions = zod_1.z.object({
|
|
694
|
+
imports: zod_1.z.boolean().optional(),
|
|
695
|
+
entries: zod_1.z.boolean().optional(),
|
|
696
|
+
test: zod_1.z.instanceof(RegExp).optional()
|
|
697
|
+
});
|
|
686
698
|
const experiments = zod_1.z.strictObject({
|
|
687
|
-
lazyCompilation: zod_1.z.boolean().optional(),
|
|
699
|
+
lazyCompilation: zod_1.z.boolean().optional().or(lazyCompilationOptions),
|
|
688
700
|
asyncWebAssembly: zod_1.z.boolean().optional(),
|
|
689
701
|
outputModule: zod_1.z.boolean().optional(),
|
|
690
702
|
topLevelAwait: zod_1.z.boolean().optional(),
|
package/dist/exports.d.ts
CHANGED
|
@@ -128,10 +128,14 @@ export declare const config: {
|
|
|
128
128
|
devtoolModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
|
|
129
129
|
devtoolFallbackModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
|
|
130
130
|
} | undefined;
|
|
131
|
-
target?: false | "node" | "async-node" | "
|
|
131
|
+
target?: false | "node" | "async-node" | "web" | "es5" | "webworker" | "es3" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | `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" | "async-node" | "web" | "es5" | "webworker" | "es3" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | `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;
|
|
132
132
|
mode?: "production" | "development" | "none" | undefined;
|
|
133
133
|
experiments?: {
|
|
134
|
-
lazyCompilation?: boolean |
|
|
134
|
+
lazyCompilation?: boolean | {
|
|
135
|
+
imports?: boolean | undefined;
|
|
136
|
+
entries?: boolean | undefined;
|
|
137
|
+
test?: RegExp | undefined;
|
|
138
|
+
} | undefined;
|
|
135
139
|
asyncWebAssembly?: boolean | undefined;
|
|
136
140
|
outputModule?: boolean | undefined;
|
|
137
141
|
topLevelAwait?: boolean | undefined;
|
|
@@ -233,6 +237,7 @@ export declare const config: {
|
|
|
233
237
|
children?: boolean | undefined;
|
|
234
238
|
usedExports?: boolean | undefined;
|
|
235
239
|
providedExports?: boolean | undefined;
|
|
240
|
+
optimizationBailout?: boolean | undefined;
|
|
236
241
|
} | undefined;
|
|
237
242
|
snapshot?: {
|
|
238
243
|
module?: {
|
|
@@ -343,6 +348,7 @@ export declare const config: {
|
|
|
343
348
|
publicPath?: string | undefined;
|
|
344
349
|
} | undefined;
|
|
345
350
|
} | undefined;
|
|
351
|
+
noParse?: string | RegExp | ((args_0: string, ...args_1: unknown[]) => boolean) | (string | RegExp | ((args_0: string, ...args_1: unknown[]) => boolean))[] | undefined;
|
|
346
352
|
} | undefined;
|
|
347
353
|
profile?: boolean | undefined;
|
|
348
354
|
bail?: boolean | undefined;
|
|
@@ -454,10 +460,14 @@ export declare const config: {
|
|
|
454
460
|
devtoolModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
|
|
455
461
|
devtoolFallbackModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
|
|
456
462
|
} | undefined;
|
|
457
|
-
target?: false | "node" | "async-node" | "
|
|
463
|
+
target?: false | "node" | "async-node" | "web" | "es5" | "webworker" | "es3" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | `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" | "async-node" | "web" | "es5" | "webworker" | "es3" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | `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;
|
|
458
464
|
mode?: "production" | "development" | "none" | undefined;
|
|
459
465
|
experiments?: {
|
|
460
|
-
lazyCompilation?: boolean |
|
|
466
|
+
lazyCompilation?: boolean | {
|
|
467
|
+
imports?: boolean | undefined;
|
|
468
|
+
entries?: boolean | undefined;
|
|
469
|
+
test?: RegExp | undefined;
|
|
470
|
+
} | undefined;
|
|
461
471
|
asyncWebAssembly?: boolean | undefined;
|
|
462
472
|
outputModule?: boolean | undefined;
|
|
463
473
|
topLevelAwait?: boolean | undefined;
|
|
@@ -559,6 +569,7 @@ export declare const config: {
|
|
|
559
569
|
children?: boolean | undefined;
|
|
560
570
|
usedExports?: boolean | undefined;
|
|
561
571
|
providedExports?: boolean | undefined;
|
|
572
|
+
optimizationBailout?: boolean | undefined;
|
|
562
573
|
} | undefined;
|
|
563
574
|
snapshot?: {
|
|
564
575
|
module?: {
|
|
@@ -669,6 +680,7 @@ export declare const config: {
|
|
|
669
680
|
publicPath?: string | undefined;
|
|
670
681
|
} | undefined;
|
|
671
682
|
} | undefined;
|
|
683
|
+
noParse?: string | RegExp | ((args_0: string, ...args_1: unknown[]) => boolean) | (string | RegExp | ((args_0: string, ...args_1: unknown[]) => boolean))[] | undefined;
|
|
672
684
|
} | undefined;
|
|
673
685
|
profile?: boolean | undefined;
|
|
674
686
|
bail?: boolean | undefined;
|