@rspack/core 0.5.7-canary-9e2ce60-20240320055406 → 0.5.8-canary-6b6429d-20240321010409
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/Chunk.d.ts +2 -0
- package/dist/Chunk.js +4 -0
- package/dist/Compilation.d.ts +16 -17
- package/dist/Compilation.js +10 -10
- package/dist/Compiler.js +57 -78
- package/dist/Module.d.ts +3 -0
- package/dist/Module.js +12 -0
- package/dist/Watching.d.ts +0 -1
- package/dist/Watching.js +0 -3
- package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/BannerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DefinePlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableLibraryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ExternalsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -1
- package/dist/builtin-plugin/HtmlRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
- package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SwcCssMinimizerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +1 -1
- package/dist/builtin-plugin/base.d.ts +1 -1
- package/dist/builtin-plugin/base.js +1 -1
- package/dist/builtin-plugin/index.d.ts +0 -1
- package/dist/builtin-plugin/index.js +0 -1
- package/dist/config/normalization.d.ts +2 -2
- package/dist/config/normalization.js +1 -2
- package/dist/config/zod.d.ts +16 -109
- package/dist/config/zod.js +1 -8
- package/dist/exports.d.ts +13 -25
- package/dist/rspackOptionsApply.js +1 -12
- package/package.json +5 -5
- package/dist/builtin-plugin/lazy-compilation/backend.d.ts +0 -52
- package/dist/builtin-plugin/lazy-compilation/backend.js +0 -143
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +0 -30
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.js +0 -6
- package/dist/builtin-plugin/lazy-compilation/plugin.d.ts +0 -13
- package/dist/builtin-plugin/lazy-compilation/plugin.js +0 -60
- package/dist/util/normalization.d.ts +0 -5
- package/dist/util/normalization.js +0 -9
package/dist/config/zod.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import type * as oldBuiltins from "../builtin-plugin";
|
|
|
6
6
|
import type * as webpackDevServer from "webpack-dev-server";
|
|
7
7
|
import { Module } from "../Module";
|
|
8
8
|
import { Chunk } from "../Chunk";
|
|
9
|
-
import { LazyCompilationDefaultBackendOptions } from "../builtin-plugin/lazy-compilation/backend";
|
|
10
9
|
declare const name: z.ZodString;
|
|
11
10
|
export type Name = z.infer<typeof name>;
|
|
12
11
|
declare const dependencies: z.ZodArray<z.ZodString, "many">;
|
|
@@ -3202,7 +3201,7 @@ declare const optimization: z.ZodObject<{
|
|
|
3202
3201
|
moduleIds?: "named" | "deterministic" | undefined;
|
|
3203
3202
|
chunkIds?: "named" | "deterministic" | undefined;
|
|
3204
3203
|
minimize?: boolean | undefined;
|
|
3205
|
-
minimizer?: (false | "" | 0 | "..." |
|
|
3204
|
+
minimizer?: (false | "" | 0 | RspackPluginInstance | "..." | RspackPluginFunction | null | undefined)[] | undefined;
|
|
3206
3205
|
mergeDuplicateChunks?: boolean | undefined;
|
|
3207
3206
|
splitChunks?: false | {
|
|
3208
3207
|
chunks?: RegExp | "async" | "initial" | "all" | ((args_0: Chunk, ...args_1: unknown[]) => boolean) | undefined;
|
|
@@ -3259,7 +3258,7 @@ declare const optimization: z.ZodObject<{
|
|
|
3259
3258
|
moduleIds?: "named" | "deterministic" | undefined;
|
|
3260
3259
|
chunkIds?: "named" | "deterministic" | undefined;
|
|
3261
3260
|
minimize?: boolean | undefined;
|
|
3262
|
-
minimizer?: (false | "" | 0 | "..." |
|
|
3261
|
+
minimizer?: (false | "" | 0 | RspackPluginInstance | "..." | RspackPluginFunction | null | undefined)[] | undefined;
|
|
3263
3262
|
mergeDuplicateChunks?: boolean | undefined;
|
|
3264
3263
|
splitChunks?: false | {
|
|
3265
3264
|
chunks?: RegExp | "async" | "initial" | "all" | ((args_0: Chunk, ...args_1: unknown[]) => boolean) | undefined;
|
|
@@ -3343,46 +3342,8 @@ declare const rspackFutureOptions: z.ZodObject<{
|
|
|
3343
3342
|
} | undefined;
|
|
3344
3343
|
}>;
|
|
3345
3344
|
export type RspackFutureOptions = z.infer<typeof rspackFutureOptions>;
|
|
3346
|
-
declare const lazyCompilationOptions: z.ZodObject<{
|
|
3347
|
-
cacheable: z.ZodOptional<z.ZodBoolean>;
|
|
3348
|
-
imports: z.ZodOptional<z.ZodBoolean>;
|
|
3349
|
-
entries: z.ZodOptional<z.ZodBoolean>;
|
|
3350
|
-
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
|
|
3351
|
-
backend: z.ZodOptional<z.ZodType<LazyCompilationDefaultBackendOptions, z.ZodTypeDef, LazyCompilationDefaultBackendOptions>>;
|
|
3352
|
-
}, "strip", z.ZodTypeAny, {
|
|
3353
|
-
cacheable?: boolean | undefined;
|
|
3354
|
-
imports?: boolean | undefined;
|
|
3355
|
-
entries?: boolean | undefined;
|
|
3356
|
-
test?: RegExp | undefined;
|
|
3357
|
-
backend?: LazyCompilationDefaultBackendOptions | undefined;
|
|
3358
|
-
}, {
|
|
3359
|
-
cacheable?: boolean | undefined;
|
|
3360
|
-
imports?: boolean | undefined;
|
|
3361
|
-
entries?: boolean | undefined;
|
|
3362
|
-
test?: RegExp | undefined;
|
|
3363
|
-
backend?: LazyCompilationDefaultBackendOptions | undefined;
|
|
3364
|
-
}>;
|
|
3365
|
-
export type LazyCompilationOptions = z.infer<typeof lazyCompilationOptions>;
|
|
3366
3345
|
declare const experiments: z.ZodObject<{
|
|
3367
|
-
lazyCompilation: z.
|
|
3368
|
-
cacheable: z.ZodOptional<z.ZodBoolean>;
|
|
3369
|
-
imports: z.ZodOptional<z.ZodBoolean>;
|
|
3370
|
-
entries: z.ZodOptional<z.ZodBoolean>;
|
|
3371
|
-
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
|
|
3372
|
-
backend: z.ZodOptional<z.ZodType<LazyCompilationDefaultBackendOptions, z.ZodTypeDef, LazyCompilationDefaultBackendOptions>>;
|
|
3373
|
-
}, "strip", z.ZodTypeAny, {
|
|
3374
|
-
cacheable?: boolean | undefined;
|
|
3375
|
-
imports?: boolean | undefined;
|
|
3376
|
-
entries?: boolean | undefined;
|
|
3377
|
-
test?: RegExp | undefined;
|
|
3378
|
-
backend?: LazyCompilationDefaultBackendOptions | undefined;
|
|
3379
|
-
}, {
|
|
3380
|
-
cacheable?: boolean | undefined;
|
|
3381
|
-
imports?: boolean | undefined;
|
|
3382
|
-
entries?: boolean | undefined;
|
|
3383
|
-
test?: RegExp | undefined;
|
|
3384
|
-
backend?: LazyCompilationDefaultBackendOptions | undefined;
|
|
3385
|
-
}>]>;
|
|
3346
|
+
lazyCompilation: z.ZodOptional<z.ZodBoolean>;
|
|
3386
3347
|
asyncWebAssembly: z.ZodOptional<z.ZodBoolean>;
|
|
3387
3348
|
outputModule: z.ZodOptional<z.ZodBoolean>;
|
|
3388
3349
|
topLevelAwait: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3418,13 +3379,7 @@ declare const experiments: z.ZodObject<{
|
|
|
3418
3379
|
} | undefined;
|
|
3419
3380
|
}>>;
|
|
3420
3381
|
}, "strict", z.ZodTypeAny, {
|
|
3421
|
-
lazyCompilation?: boolean |
|
|
3422
|
-
cacheable?: boolean | undefined;
|
|
3423
|
-
imports?: boolean | undefined;
|
|
3424
|
-
entries?: boolean | undefined;
|
|
3425
|
-
test?: RegExp | undefined;
|
|
3426
|
-
backend?: LazyCompilationDefaultBackendOptions | undefined;
|
|
3427
|
-
} | undefined;
|
|
3382
|
+
lazyCompilation?: boolean | undefined;
|
|
3428
3383
|
asyncWebAssembly?: boolean | undefined;
|
|
3429
3384
|
outputModule?: boolean | undefined;
|
|
3430
3385
|
topLevelAwait?: boolean | undefined;
|
|
@@ -3440,13 +3395,7 @@ declare const experiments: z.ZodObject<{
|
|
|
3440
3395
|
} | undefined;
|
|
3441
3396
|
} | undefined;
|
|
3442
3397
|
}, {
|
|
3443
|
-
lazyCompilation?: boolean |
|
|
3444
|
-
cacheable?: boolean | undefined;
|
|
3445
|
-
imports?: boolean | undefined;
|
|
3446
|
-
entries?: boolean | undefined;
|
|
3447
|
-
test?: RegExp | undefined;
|
|
3448
|
-
backend?: LazyCompilationDefaultBackendOptions | undefined;
|
|
3449
|
-
} | undefined;
|
|
3398
|
+
lazyCompilation?: boolean | undefined;
|
|
3450
3399
|
asyncWebAssembly?: boolean | undefined;
|
|
3451
3400
|
outputModule?: boolean | undefined;
|
|
3452
3401
|
topLevelAwait?: boolean | undefined;
|
|
@@ -3928,25 +3877,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
3928
3877
|
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">]>>;
|
|
3929
3878
|
mode: z.ZodOptional<z.ZodEnum<["development", "production", "none"]>>;
|
|
3930
3879
|
experiments: z.ZodOptional<z.ZodObject<{
|
|
3931
|
-
lazyCompilation: z.
|
|
3932
|
-
cacheable: z.ZodOptional<z.ZodBoolean>;
|
|
3933
|
-
imports: z.ZodOptional<z.ZodBoolean>;
|
|
3934
|
-
entries: z.ZodOptional<z.ZodBoolean>;
|
|
3935
|
-
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
|
|
3936
|
-
backend: z.ZodOptional<z.ZodType<LazyCompilationDefaultBackendOptions, z.ZodTypeDef, LazyCompilationDefaultBackendOptions>>;
|
|
3937
|
-
}, "strip", z.ZodTypeAny, {
|
|
3938
|
-
cacheable?: boolean | undefined;
|
|
3939
|
-
imports?: boolean | undefined;
|
|
3940
|
-
entries?: boolean | undefined;
|
|
3941
|
-
test?: RegExp | undefined;
|
|
3942
|
-
backend?: LazyCompilationDefaultBackendOptions | undefined;
|
|
3943
|
-
}, {
|
|
3944
|
-
cacheable?: boolean | undefined;
|
|
3945
|
-
imports?: boolean | undefined;
|
|
3946
|
-
entries?: boolean | undefined;
|
|
3947
|
-
test?: RegExp | undefined;
|
|
3948
|
-
backend?: LazyCompilationDefaultBackendOptions | undefined;
|
|
3949
|
-
}>]>;
|
|
3880
|
+
lazyCompilation: z.ZodOptional<z.ZodBoolean>;
|
|
3950
3881
|
asyncWebAssembly: z.ZodOptional<z.ZodBoolean>;
|
|
3951
3882
|
outputModule: z.ZodOptional<z.ZodBoolean>;
|
|
3952
3883
|
topLevelAwait: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3982,13 +3913,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
3982
3913
|
} | undefined;
|
|
3983
3914
|
}>>;
|
|
3984
3915
|
}, "strict", z.ZodTypeAny, {
|
|
3985
|
-
lazyCompilation?: boolean |
|
|
3986
|
-
cacheable?: boolean | undefined;
|
|
3987
|
-
imports?: boolean | undefined;
|
|
3988
|
-
entries?: boolean | undefined;
|
|
3989
|
-
test?: RegExp | undefined;
|
|
3990
|
-
backend?: LazyCompilationDefaultBackendOptions | undefined;
|
|
3991
|
-
} | undefined;
|
|
3916
|
+
lazyCompilation?: boolean | undefined;
|
|
3992
3917
|
asyncWebAssembly?: boolean | undefined;
|
|
3993
3918
|
outputModule?: boolean | undefined;
|
|
3994
3919
|
topLevelAwait?: boolean | undefined;
|
|
@@ -4004,13 +3929,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
4004
3929
|
} | undefined;
|
|
4005
3930
|
} | undefined;
|
|
4006
3931
|
}, {
|
|
4007
|
-
lazyCompilation?: boolean |
|
|
4008
|
-
cacheable?: boolean | undefined;
|
|
4009
|
-
imports?: boolean | undefined;
|
|
4010
|
-
entries?: boolean | undefined;
|
|
4011
|
-
test?: RegExp | undefined;
|
|
4012
|
-
backend?: LazyCompilationDefaultBackendOptions | undefined;
|
|
4013
|
-
} | undefined;
|
|
3932
|
+
lazyCompilation?: boolean | undefined;
|
|
4014
3933
|
asyncWebAssembly?: boolean | undefined;
|
|
4015
3934
|
outputModule?: boolean | undefined;
|
|
4016
3935
|
topLevelAwait?: boolean | undefined;
|
|
@@ -4491,7 +4410,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
4491
4410
|
moduleIds?: "named" | "deterministic" | undefined;
|
|
4492
4411
|
chunkIds?: "named" | "deterministic" | undefined;
|
|
4493
4412
|
minimize?: boolean | undefined;
|
|
4494
|
-
minimizer?: (false | "" | 0 | "..." |
|
|
4413
|
+
minimizer?: (false | "" | 0 | RspackPluginInstance | "..." | RspackPluginFunction | null | undefined)[] | undefined;
|
|
4495
4414
|
mergeDuplicateChunks?: boolean | undefined;
|
|
4496
4415
|
splitChunks?: false | {
|
|
4497
4416
|
chunks?: RegExp | "async" | "initial" | "all" | ((args_0: Chunk, ...args_1: unknown[]) => boolean) | undefined;
|
|
@@ -4548,7 +4467,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
4548
4467
|
moduleIds?: "named" | "deterministic" | undefined;
|
|
4549
4468
|
chunkIds?: "named" | "deterministic" | undefined;
|
|
4550
4469
|
minimize?: boolean | undefined;
|
|
4551
|
-
minimizer?: (false | "" | 0 | "..." |
|
|
4470
|
+
minimizer?: (false | "" | 0 | RspackPluginInstance | "..." | RspackPluginFunction | null | undefined)[] | undefined;
|
|
4552
4471
|
mergeDuplicateChunks?: boolean | undefined;
|
|
4553
4472
|
splitChunks?: false | {
|
|
4554
4473
|
chunks?: RegExp | "async" | "initial" | "all" | ((args_0: Chunk, ...args_1: unknown[]) => boolean) | undefined;
|
|
@@ -5007,16 +4926,10 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
5007
4926
|
devtoolModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
|
|
5008
4927
|
devtoolFallbackModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
|
|
5009
4928
|
} | undefined;
|
|
5010
|
-
target?: false | "node" | "async-node" | "web" | "
|
|
4929
|
+
target?: false | "node" | "async-node" | "web" | "webworker" | "es3" | "es5" | "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" | "webworker" | "es3" | "es5" | "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;
|
|
5011
4930
|
mode?: "production" | "development" | "none" | undefined;
|
|
5012
4931
|
experiments?: {
|
|
5013
|
-
lazyCompilation?: boolean |
|
|
5014
|
-
cacheable?: boolean | undefined;
|
|
5015
|
-
imports?: boolean | undefined;
|
|
5016
|
-
entries?: boolean | undefined;
|
|
5017
|
-
test?: RegExp | undefined;
|
|
5018
|
-
backend?: LazyCompilationDefaultBackendOptions | undefined;
|
|
5019
|
-
} | undefined;
|
|
4932
|
+
lazyCompilation?: boolean | undefined;
|
|
5020
4933
|
asyncWebAssembly?: boolean | undefined;
|
|
5021
4934
|
outputModule?: boolean | undefined;
|
|
5022
4935
|
topLevelAwait?: boolean | undefined;
|
|
@@ -5134,7 +5047,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
5134
5047
|
moduleIds?: "named" | "deterministic" | undefined;
|
|
5135
5048
|
chunkIds?: "named" | "deterministic" | undefined;
|
|
5136
5049
|
minimize?: boolean | undefined;
|
|
5137
|
-
minimizer?: (false | "" | 0 | "..." |
|
|
5050
|
+
minimizer?: (false | "" | 0 | RspackPluginInstance | "..." | RspackPluginFunction | null | undefined)[] | undefined;
|
|
5138
5051
|
mergeDuplicateChunks?: boolean | undefined;
|
|
5139
5052
|
splitChunks?: false | {
|
|
5140
5053
|
chunks?: RegExp | "async" | "initial" | "all" | ((args_0: Chunk, ...args_1: unknown[]) => boolean) | undefined;
|
|
@@ -5345,16 +5258,10 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
5345
5258
|
devtoolModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
|
|
5346
5259
|
devtoolFallbackModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
|
|
5347
5260
|
} | undefined;
|
|
5348
|
-
target?: false | "node" | "async-node" | "web" | "
|
|
5261
|
+
target?: false | "node" | "async-node" | "web" | "webworker" | "es3" | "es5" | "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" | "webworker" | "es3" | "es5" | "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;
|
|
5349
5262
|
mode?: "production" | "development" | "none" | undefined;
|
|
5350
5263
|
experiments?: {
|
|
5351
|
-
lazyCompilation?: boolean |
|
|
5352
|
-
cacheable?: boolean | undefined;
|
|
5353
|
-
imports?: boolean | undefined;
|
|
5354
|
-
entries?: boolean | undefined;
|
|
5355
|
-
test?: RegExp | undefined;
|
|
5356
|
-
backend?: LazyCompilationDefaultBackendOptions | undefined;
|
|
5357
|
-
} | undefined;
|
|
5264
|
+
lazyCompilation?: boolean | undefined;
|
|
5358
5265
|
asyncWebAssembly?: boolean | undefined;
|
|
5359
5266
|
outputModule?: boolean | undefined;
|
|
5360
5267
|
topLevelAwait?: boolean | undefined;
|
|
@@ -5472,7 +5379,7 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
5472
5379
|
moduleIds?: "named" | "deterministic" | undefined;
|
|
5473
5380
|
chunkIds?: "named" | "deterministic" | undefined;
|
|
5474
5381
|
minimize?: boolean | undefined;
|
|
5475
|
-
minimizer?: (false | "" | 0 | "..." |
|
|
5382
|
+
minimizer?: (false | "" | 0 | RspackPluginInstance | "..." | RspackPluginFunction | null | undefined)[] | undefined;
|
|
5476
5383
|
mergeDuplicateChunks?: boolean | undefined;
|
|
5477
5384
|
splitChunks?: false | {
|
|
5478
5385
|
chunks?: RegExp | "async" | "initial" | "all" | ((args_0: Chunk, ...args_1: unknown[]) => boolean) | undefined;
|
package/dist/config/zod.js
CHANGED
|
@@ -697,15 +697,8 @@ const rspackFutureOptions = zod_1.z.strictObject({
|
|
|
697
697
|
})
|
|
698
698
|
.optional()
|
|
699
699
|
});
|
|
700
|
-
const lazyCompilationOptions = zod_1.z.object({
|
|
701
|
-
cacheable: zod_1.z.boolean().optional(),
|
|
702
|
-
imports: zod_1.z.boolean().optional(),
|
|
703
|
-
entries: zod_1.z.boolean().optional(),
|
|
704
|
-
test: zod_1.z.instanceof(RegExp).optional(),
|
|
705
|
-
backend: zod_1.z.custom().optional()
|
|
706
|
-
});
|
|
707
700
|
const experiments = zod_1.z.strictObject({
|
|
708
|
-
lazyCompilation: zod_1.z.boolean().optional()
|
|
701
|
+
lazyCompilation: zod_1.z.boolean().optional(),
|
|
709
702
|
asyncWebAssembly: zod_1.z.boolean().optional(),
|
|
710
703
|
outputModule: zod_1.z.boolean().optional(),
|
|
711
704
|
topLevelAwait: zod_1.z.boolean().optional(),
|
package/dist/exports.d.ts
CHANGED
|
@@ -128,16 +128,10 @@ 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" | "web" | "
|
|
131
|
+
target?: false | "node" | "async-node" | "web" | "webworker" | "es3" | "es5" | "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" | "webworker" | "es3" | "es5" | "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 |
|
|
135
|
-
cacheable?: boolean | undefined;
|
|
136
|
-
imports?: boolean | undefined;
|
|
137
|
-
entries?: boolean | undefined;
|
|
138
|
-
test?: RegExp | undefined;
|
|
139
|
-
backend?: import("./builtin-plugin/lazy-compilation/backend").LazyCompilationDefaultBackendOptions | undefined;
|
|
140
|
-
} | undefined;
|
|
134
|
+
lazyCompilation?: boolean | undefined;
|
|
141
135
|
asyncWebAssembly?: boolean | undefined;
|
|
142
136
|
outputModule?: boolean | undefined;
|
|
143
137
|
topLevelAwait?: boolean | undefined;
|
|
@@ -255,7 +249,7 @@ export declare const config: {
|
|
|
255
249
|
moduleIds?: "named" | "deterministic" | undefined;
|
|
256
250
|
chunkIds?: "named" | "deterministic" | undefined;
|
|
257
251
|
minimize?: boolean | undefined;
|
|
258
|
-
minimizer?: (false | "" | 0 |
|
|
252
|
+
minimizer?: (false | "" | 0 | import("./config").RspackPluginInstance | "..." | import("./config").RspackPluginFunction | null | undefined)[] | undefined;
|
|
259
253
|
mergeDuplicateChunks?: boolean | undefined;
|
|
260
254
|
splitChunks?: false | {
|
|
261
255
|
chunks?: RegExp | "async" | "initial" | "all" | ((args_0: import("./Chunk").Chunk, ...args_1: unknown[]) => boolean) | undefined;
|
|
@@ -468,16 +462,10 @@ export declare const config: {
|
|
|
468
462
|
devtoolModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
|
|
469
463
|
devtoolFallbackModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
|
|
470
464
|
} | undefined;
|
|
471
|
-
target?: false | "node" | "async-node" | "web" | "
|
|
465
|
+
target?: false | "node" | "async-node" | "web" | "webworker" | "es3" | "es5" | "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" | "webworker" | "es3" | "es5" | "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;
|
|
472
466
|
mode?: "production" | "development" | "none" | undefined;
|
|
473
467
|
experiments?: {
|
|
474
|
-
lazyCompilation?: boolean |
|
|
475
|
-
cacheable?: boolean | undefined;
|
|
476
|
-
imports?: boolean | undefined;
|
|
477
|
-
entries?: boolean | undefined;
|
|
478
|
-
test?: RegExp | undefined;
|
|
479
|
-
backend?: import("./builtin-plugin/lazy-compilation/backend").LazyCompilationDefaultBackendOptions | undefined;
|
|
480
|
-
} | undefined;
|
|
468
|
+
lazyCompilation?: boolean | undefined;
|
|
481
469
|
asyncWebAssembly?: boolean | undefined;
|
|
482
470
|
outputModule?: boolean | undefined;
|
|
483
471
|
topLevelAwait?: boolean | undefined;
|
|
@@ -595,7 +583,7 @@ export declare const config: {
|
|
|
595
583
|
moduleIds?: "named" | "deterministic" | undefined;
|
|
596
584
|
chunkIds?: "named" | "deterministic" | undefined;
|
|
597
585
|
minimize?: boolean | undefined;
|
|
598
|
-
minimizer?: (false | "" | 0 |
|
|
586
|
+
minimizer?: (false | "" | 0 | import("./config").RspackPluginInstance | "..." | import("./config").RspackPluginFunction | null | undefined)[] | undefined;
|
|
599
587
|
mergeDuplicateChunks?: boolean | undefined;
|
|
600
588
|
splitChunks?: false | {
|
|
601
589
|
chunks?: RegExp | "async" | "initial" | "all" | ((args_0: import("./Chunk").Chunk, ...args_1: unknown[]) => boolean) | undefined;
|
|
@@ -731,7 +719,7 @@ export declare const node: {
|
|
|
731
719
|
new (): {
|
|
732
720
|
name: import("@rspack/binding").BuiltinPluginName;
|
|
733
721
|
_options: undefined;
|
|
734
|
-
affectedHooks: "
|
|
722
|
+
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishModules" | "finishMake" | "entryOption" | undefined;
|
|
735
723
|
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
736
724
|
apply(compiler: import("./Compiler").Compiler): void;
|
|
737
725
|
};
|
|
@@ -743,7 +731,7 @@ export declare const electron: {
|
|
|
743
731
|
new (context?: string | undefined): {
|
|
744
732
|
name: import("@rspack/binding").BuiltinPluginName;
|
|
745
733
|
_options: string;
|
|
746
|
-
affectedHooks: "
|
|
734
|
+
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishModules" | "finishMake" | "entryOption" | undefined;
|
|
747
735
|
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
748
736
|
apply(compiler: import("./Compiler").Compiler): void;
|
|
749
737
|
};
|
|
@@ -754,7 +742,7 @@ export declare const library: {
|
|
|
754
742
|
new (type: any): {
|
|
755
743
|
name: import("@rspack/binding").BuiltinPluginName;
|
|
756
744
|
_options: any;
|
|
757
|
-
affectedHooks: "
|
|
745
|
+
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishModules" | "finishMake" | "entryOption" | undefined;
|
|
758
746
|
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
759
747
|
apply(compiler: import("./Compiler").Compiler): void;
|
|
760
748
|
};
|
|
@@ -765,7 +753,7 @@ export declare const wasm: {
|
|
|
765
753
|
new (type: any): {
|
|
766
754
|
name: import("@rspack/binding").BuiltinPluginName;
|
|
767
755
|
_options: any;
|
|
768
|
-
affectedHooks: "
|
|
756
|
+
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishModules" | "finishMake" | "entryOption" | undefined;
|
|
769
757
|
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
770
758
|
apply(compiler: import("./Compiler").Compiler): void;
|
|
771
759
|
};
|
|
@@ -776,7 +764,7 @@ export declare const javascript: {
|
|
|
776
764
|
new (type: any): {
|
|
777
765
|
name: import("@rspack/binding").BuiltinPluginName;
|
|
778
766
|
_options: any;
|
|
779
|
-
affectedHooks: "
|
|
767
|
+
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishModules" | "finishMake" | "entryOption" | undefined;
|
|
780
768
|
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
781
769
|
apply(compiler: import("./Compiler").Compiler): void;
|
|
782
770
|
};
|
|
@@ -787,7 +775,7 @@ export declare const webworker: {
|
|
|
787
775
|
new (): {
|
|
788
776
|
name: import("@rspack/binding").BuiltinPluginName;
|
|
789
777
|
_options: undefined;
|
|
790
|
-
affectedHooks: "
|
|
778
|
+
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishModules" | "finishMake" | "entryOption" | undefined;
|
|
791
779
|
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
792
780
|
apply(compiler: import("./Compiler").Compiler): void;
|
|
793
781
|
};
|
|
@@ -798,7 +786,7 @@ export declare const optimize: {
|
|
|
798
786
|
new (options: import("./builtin-plugin").LimitChunkCountOptions): {
|
|
799
787
|
name: import("@rspack/binding").BuiltinPluginName;
|
|
800
788
|
_options: import("@rspack/binding").RawLimitChunkCountPluginOptions;
|
|
801
|
-
affectedHooks: "
|
|
789
|
+
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishModules" | "finishMake" | "entryOption" | undefined;
|
|
802
790
|
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
803
791
|
apply(compiler: import("./Compiler").Compiler): void;
|
|
804
792
|
};
|
|
@@ -30,7 +30,7 @@ exports.applyEntryOptions = applyEntryOptions;
|
|
|
30
30
|
class RspackOptionsApply {
|
|
31
31
|
constructor() { }
|
|
32
32
|
process(options, compiler) {
|
|
33
|
-
var _a
|
|
33
|
+
var _a;
|
|
34
34
|
(0, assert_1.default)(options.output.path, "options.output.path should have value after `applyRspackOptionsDefaults`");
|
|
35
35
|
compiler.outputPath = options.output.path;
|
|
36
36
|
compiler.name = options.name;
|
|
@@ -171,17 +171,6 @@ class RspackOptionsApply {
|
|
|
171
171
|
new builtin_plugin_1.MangleExportsPlugin(options.optimization.mangleExports !== "size").apply(compiler);
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
if (options.experiments.lazyCompilation) {
|
|
175
|
-
const lazyOptions = options.experiments.lazyCompilation;
|
|
176
|
-
new builtin_plugin_1.LazyCompilationPlugin(
|
|
177
|
-
// this is only for test
|
|
178
|
-
(_b = lazyOptions.cacheable) !== null && _b !== void 0 ? _b : true, (_c = lazyOptions.entries) !== null && _c !== void 0 ? _c : true, (_d = lazyOptions.imports) !== null && _d !== void 0 ? _d : true, lazyOptions.test
|
|
179
|
-
? {
|
|
180
|
-
source: lazyOptions.test.source,
|
|
181
|
-
flags: lazyOptions.test.flags
|
|
182
|
-
}
|
|
183
|
-
: undefined, lazyOptions.backend).apply(compiler);
|
|
184
|
-
}
|
|
185
174
|
if (options.output.enabledLibraryTypes &&
|
|
186
175
|
options.output.enabledLibraryTypes.length > 0) {
|
|
187
176
|
for (const type of options.output.enabledLibraryTypes) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/core",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8-canary-6b6429d-20240321010409",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "A Fast Rust-based Web Bundler",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"styled-components": "^6.0.8",
|
|
56
56
|
"terser": "5.27.2",
|
|
57
57
|
"wast-loader": "^1.11.4",
|
|
58
|
-
"@rspack/
|
|
59
|
-
"@rspack/plugin-
|
|
60
|
-
"@rspack/
|
|
58
|
+
"@rspack/plugin-minify": "^0.5.8-canary-6b6429d-20240321010409",
|
|
59
|
+
"@rspack/plugin-node-polyfill": "^0.5.8-canary-6b6429d-20240321010409",
|
|
60
|
+
"@rspack/core": "0.5.8-canary-6b6429d-20240321010409"
|
|
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.
|
|
75
|
+
"@rspack/binding": "0.5.8-canary-6b6429d-20240321010409"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"@swc/helpers": ">=0.5.1"
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
/// <reference types="node" />
|
|
4
|
-
/// <reference types="node" />
|
|
5
|
-
import type { IncomingMessage, ServerResponse, ServerOptions as ServerOptionsImport } from "http";
|
|
6
|
-
import type { ListenOptions, Server } from "net";
|
|
7
|
-
import type { Compiler } from "../..";
|
|
8
|
-
import type { SecureContextOptions, TlsOptions } from "tls";
|
|
9
|
-
export interface LazyCompilationDefaultBackendOptions {
|
|
10
|
-
/**
|
|
11
|
-
* A custom client.
|
|
12
|
-
*/
|
|
13
|
-
client?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Specifies where to listen to from the server.
|
|
16
|
-
*/
|
|
17
|
-
listen?: number | ListenOptions | ((server: Server) => void);
|
|
18
|
-
/**
|
|
19
|
-
* Specifies the protocol the client should use to connect to the server.
|
|
20
|
-
*/
|
|
21
|
-
protocol?: "http" | "https";
|
|
22
|
-
/**
|
|
23
|
-
* Specifies how to create the server handling the EventSource requests.
|
|
24
|
-
*/
|
|
25
|
-
server?: ServerOptionsImport<typeof IncomingMessage> | ServerOptionsHttps<typeof IncomingMessage, typeof ServerResponse> | (() => Server);
|
|
26
|
-
}
|
|
27
|
-
export type ServerOptionsHttps<Request extends typeof IncomingMessage = typeof IncomingMessage, Response extends typeof ServerResponse = typeof ServerResponse> = SecureContextOptions & TlsOptions & ServerOptionsImport<Request, Response>;
|
|
28
|
-
/**
|
|
29
|
-
* @param {Omit<LazyCompilationDefaultBackendOptions, "client"> & { client: NonNullable<LazyCompilationDefaultBackendOptions["client"]>}} options additional options for the backend
|
|
30
|
-
* @returns {BackendHandler} backend
|
|
31
|
-
*/
|
|
32
|
-
declare const getBackend: (options: any) => (compiler: Compiler, callback: (err: any, obj?: {
|
|
33
|
-
dispose: (callback: (err: any) => void) => void;
|
|
34
|
-
module: (args: {
|
|
35
|
-
module: string;
|
|
36
|
-
path: string;
|
|
37
|
-
}) => {
|
|
38
|
-
data: string;
|
|
39
|
-
client: string;
|
|
40
|
-
active: boolean;
|
|
41
|
-
};
|
|
42
|
-
} | undefined) => void) => void;
|
|
43
|
-
export default getBackend;
|
|
44
|
-
export declare function dispose(callback: any): void;
|
|
45
|
-
export declare function moduleImpl(args: {
|
|
46
|
-
module: string;
|
|
47
|
-
path: string;
|
|
48
|
-
}): {
|
|
49
|
-
active: boolean;
|
|
50
|
-
data: string;
|
|
51
|
-
client: string;
|
|
52
|
-
};
|