@rspack/core 1.2.8 → 1.3.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChunkGraph.d.ts +3 -4
- package/dist/ChunkGroup.d.ts +1 -1
- package/dist/Compilation.d.ts +2 -2
- package/dist/ConcatenatedModule.d.ts +1 -0
- package/dist/ContextModule.d.ts +1 -0
- package/dist/ExternalModule.d.ts +1 -0
- package/dist/Module.d.ts +15 -51
- package/dist/ModuleGraph.d.ts +1 -1
- package/dist/ModuleGraphConnection.d.ts +1 -1
- package/dist/NormalModule.d.ts +10 -7
- package/dist/Resolver.d.ts +2 -0
- package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
- 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/ContextReplacementPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CssModulesPlugin.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/DllEntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DllReferenceAgencyPlugin.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/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/FetchCompileAsyncWasmPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
- package/dist/builtin-plugin/InferAsyncModulesPlugin.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/LibManifestPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LimitChunkCountPlugin.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/ModuleInfoHeaderPlugin.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/NoEmitOnErrorsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.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/RemoveDuplicateModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RsdoctorPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimeChunkPlugin.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/SizeLimitsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SubresourceIntegrityPlugin.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/base.d.ts +1 -1
- package/dist/builtin-plugin/html-plugin/plugin.d.ts +1 -1
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +5 -4
- package/dist/builtin-plugin/lazy-compilation/plugin.d.ts +3 -3
- package/dist/config/adapterRuleUse.d.ts +1 -1
- package/dist/config/index.d.ts +0 -1
- package/dist/config/types.d.ts +17 -1
- package/dist/config/zod.d.ts +354 -326
- package/dist/container/ModuleFederationPluginV1.d.ts +1 -1
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
- package/dist/exports.d.ts +4 -1
- package/dist/index.js +2127 -2189
- package/package.json +7 -7
- package/dist/DependenciesBlock.d.ts +0 -9
|
@@ -3,7 +3,7 @@ export declare const JsonModulesPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
7
7
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("..").Compiler): void;
|
|
9
9
|
};
|
|
@@ -11,7 +11,7 @@ export declare const LibManifestPlugin: {
|
|
|
11
11
|
new (options: LibManifestPluginOptions): {
|
|
12
12
|
name: BuiltinPluginName;
|
|
13
13
|
_args: [options: LibManifestPluginOptions];
|
|
14
|
-
affectedHooks: "done" | "
|
|
14
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
15
15
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
16
16
|
apply(compiler: import("..").Compiler): void;
|
|
17
17
|
};
|
|
@@ -26,7 +26,7 @@ export declare const LightningCssMinimizerRspackPlugin: {
|
|
|
26
26
|
new (options?: LightningCssMinimizerRspackPluginOptions | undefined): {
|
|
27
27
|
name: BuiltinPluginName;
|
|
28
28
|
_args: [options?: LightningCssMinimizerRspackPluginOptions | undefined];
|
|
29
|
-
affectedHooks: "done" | "
|
|
29
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
30
30
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
31
31
|
apply(compiler: import("..").Compiler): void;
|
|
32
32
|
};
|
|
@@ -8,7 +8,7 @@ export declare const LimitChunkCountPlugin: {
|
|
|
8
8
|
new (options: LimitChunkCountOptions): {
|
|
9
9
|
name: BuiltinPluginName;
|
|
10
10
|
_args: [options: LimitChunkCountOptions];
|
|
11
|
-
affectedHooks: "done" | "
|
|
11
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
12
12
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
13
13
|
apply(compiler: import("..").Compiler): void;
|
|
14
14
|
};
|
|
@@ -3,7 +3,7 @@ export declare const MergeDuplicateChunksPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
7
7
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("..").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const ModuleChunkFormatPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
7
7
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("..").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const ModuleInfoHeaderPlugin: {
|
|
|
3
3
|
new (verbose: any): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [verbose: any];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
7
7
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("..").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const NamedChunkIdsPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
7
7
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("..").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const NamedModuleIdsPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
7
7
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("..").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const NoEmitOnErrorsPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
7
7
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("..").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const NodeTargetPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
7
7
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("..").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const OccurrenceChunkIdsPlugin: {
|
|
|
3
3
|
new (options?: RawOccurrenceChunkIdsPluginOptions | undefined): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [options?: RawOccurrenceChunkIdsPluginOptions | undefined];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
7
7
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("..").Compiler): void;
|
|
9
9
|
};
|
|
@@ -4,7 +4,7 @@ export declare const ProgressPlugin: {
|
|
|
4
4
|
new (progress?: ProgressPluginArgument): {
|
|
5
5
|
name: BuiltinPluginName;
|
|
6
6
|
_args: [progress?: ProgressPluginArgument];
|
|
7
|
-
affectedHooks: "done" | "
|
|
7
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
8
8
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
9
9
|
apply(compiler: import("..").Compiler): void;
|
|
10
10
|
};
|
|
@@ -4,7 +4,7 @@ export declare const ProvidePlugin: {
|
|
|
4
4
|
new (provide: ProvidePluginOptions): {
|
|
5
5
|
name: BuiltinPluginName;
|
|
6
6
|
_args: [provide: ProvidePluginOptions];
|
|
7
|
-
affectedHooks: "done" | "
|
|
7
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
8
8
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
9
9
|
apply(compiler: import("..").Compiler): void;
|
|
10
10
|
};
|
|
@@ -3,7 +3,7 @@ export declare const RealContentHashPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
7
7
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("..").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const RemoveDuplicateModulesPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
7
7
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("..").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const RemoveEmptyChunksPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
7
7
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("..").Compiler): void;
|
|
9
9
|
};
|
|
@@ -14,7 +14,7 @@ declare const RsdoctorPluginImpl: {
|
|
|
14
14
|
new (c?: RsdoctorPluginOptions | undefined): {
|
|
15
15
|
name: BuiltinPluginName;
|
|
16
16
|
_args: [c?: RsdoctorPluginOptions | undefined];
|
|
17
|
-
affectedHooks: "done" | "
|
|
17
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
18
18
|
raw(compiler: Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
19
19
|
apply(compiler: Compiler): void;
|
|
20
20
|
};
|
|
@@ -4,7 +4,7 @@ export declare const RuntimeChunkPlugin: {
|
|
|
4
4
|
new (options: RawRuntimeChunkOptions): {
|
|
5
5
|
name: BuiltinPluginName;
|
|
6
6
|
_args: [options: RawRuntimeChunkOptions];
|
|
7
|
-
affectedHooks: "done" | "
|
|
7
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
8
8
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
9
9
|
apply(compiler: import("..").Compiler): void;
|
|
10
10
|
};
|
|
@@ -7,7 +7,7 @@ export declare const RuntimePluginImpl: {
|
|
|
7
7
|
new (): {
|
|
8
8
|
name: binding.BuiltinPluginName;
|
|
9
9
|
_args: [];
|
|
10
|
-
affectedHooks: "done" | "
|
|
10
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
11
11
|
raw(compiler: import("..").Compiler): binding.BuiltinPlugin;
|
|
12
12
|
apply(compiler: import("..").Compiler): void;
|
|
13
13
|
};
|
|
@@ -3,7 +3,7 @@ export declare const SideEffectsFlagPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
7
7
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("..").Compiler): void;
|
|
9
9
|
};
|
|
@@ -13,7 +13,7 @@ export declare const SizeLimitsPlugin: {
|
|
|
13
13
|
maxAssetSize?: number;
|
|
14
14
|
maxEntrypointSize?: number;
|
|
15
15
|
}];
|
|
16
|
-
affectedHooks: "done" | "
|
|
16
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
17
17
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
18
18
|
apply(compiler: import("..").Compiler): void;
|
|
19
19
|
};
|
|
@@ -4,7 +4,7 @@ export declare const SourceMapDevToolPlugin: {
|
|
|
4
4
|
new (options: RawSourceMapDevToolPluginOptions): {
|
|
5
5
|
name: BuiltinPluginName;
|
|
6
6
|
_args: [options: RawSourceMapDevToolPluginOptions];
|
|
7
|
-
affectedHooks: "done" | "
|
|
7
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
8
8
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
9
9
|
apply(compiler: import("..").Compiler): void;
|
|
10
10
|
};
|
|
@@ -20,7 +20,7 @@ declare const NativeSubresourceIntegrityPlugin: {
|
|
|
20
20
|
new (options: NativeSubresourceIntegrityPluginOptions): {
|
|
21
21
|
name: BuiltinPluginName;
|
|
22
22
|
_args: [options: NativeSubresourceIntegrityPluginOptions];
|
|
23
|
-
affectedHooks: "done" | "
|
|
23
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
24
24
|
raw(compiler: Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
25
25
|
apply(compiler: Compiler): void;
|
|
26
26
|
};
|
|
@@ -205,7 +205,7 @@ export declare const SwcJsMinimizerRspackPlugin: {
|
|
|
205
205
|
new (options?: SwcJsMinimizerRspackPluginOptions | undefined): {
|
|
206
206
|
name: BuiltinPluginName;
|
|
207
207
|
_args: [options?: SwcJsMinimizerRspackPluginOptions | undefined];
|
|
208
|
-
affectedHooks: "done" | "
|
|
208
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
209
209
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
210
210
|
apply(compiler: import("..").Compiler): void;
|
|
211
211
|
};
|
|
@@ -3,7 +3,7 @@ export declare const WarnCaseSensitiveModulesPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
7
7
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("..").Compiler): void;
|
|
9
9
|
};
|
|
@@ -14,7 +14,7 @@ export declare function create<T extends any[], R>(name: binding.BuiltinPluginNa
|
|
|
14
14
|
new (...args: T): {
|
|
15
15
|
name: binding.BuiltinPluginName;
|
|
16
16
|
_args: T;
|
|
17
|
-
affectedHooks: "done" | "
|
|
17
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
18
18
|
raw(compiler: Compiler): binding.BuiltinPlugin;
|
|
19
19
|
apply(compiler: Compiler): void;
|
|
20
20
|
};
|
|
@@ -7,7 +7,7 @@ declare const HtmlRspackPluginImpl: {
|
|
|
7
7
|
new (c?: HtmlRspackPluginOptions | undefined): {
|
|
8
8
|
name: BuiltinPluginName;
|
|
9
9
|
_args: [c?: HtmlRspackPluginOptions | undefined];
|
|
10
|
-
affectedHooks: "done" | "
|
|
10
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
11
11
|
raw(compiler: Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
12
12
|
apply(compiler: Compiler): void;
|
|
13
13
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { BuiltinPluginName
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
import type { Module } from "../../Module";
|
|
2
3
|
export declare const BuiltinLazyCompilationPlugin: {
|
|
3
4
|
new (module: (args: {
|
|
4
5
|
module: string;
|
|
@@ -7,7 +8,7 @@ export declare const BuiltinLazyCompilationPlugin: {
|
|
|
7
8
|
active: boolean;
|
|
8
9
|
data: string;
|
|
9
10
|
client: string;
|
|
10
|
-
}, cacheable: boolean, entries: boolean, imports: boolean, test?: RegExp | ((
|
|
11
|
+
}, cacheable: boolean, entries: boolean, imports: boolean, test?: RegExp | ((module: Module) => boolean) | undefined): {
|
|
11
12
|
name: BuiltinPluginName;
|
|
12
13
|
_args: [module: (args: {
|
|
13
14
|
module: string;
|
|
@@ -16,8 +17,8 @@ export declare const BuiltinLazyCompilationPlugin: {
|
|
|
16
17
|
active: boolean;
|
|
17
18
|
data: string;
|
|
18
19
|
client: string;
|
|
19
|
-
}, cacheable: boolean, entries: boolean, imports: boolean, test?: RegExp | ((
|
|
20
|
-
affectedHooks: "done" | "
|
|
20
|
+
}, cacheable: boolean, entries: boolean, imports: boolean, test?: RegExp | ((module: Module) => boolean) | undefined];
|
|
21
|
+
affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
21
22
|
raw(compiler: import("../..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
22
23
|
apply(compiler: import("../..").Compiler): void;
|
|
23
24
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Module } from "../../Module";
|
|
2
2
|
import type { Compiler } from "../..";
|
|
3
3
|
import { type LazyCompilationDefaultBackendOptions } from "./backend";
|
|
4
4
|
export default class LazyCompilationPlugin {
|
|
5
5
|
cacheable: boolean;
|
|
6
6
|
entries: boolean;
|
|
7
7
|
imports: boolean;
|
|
8
|
-
test?: RegExp | ((
|
|
8
|
+
test?: RegExp | ((module: Module) => boolean);
|
|
9
9
|
backend?: LazyCompilationDefaultBackendOptions;
|
|
10
|
-
constructor(cacheable: boolean, entries: boolean, imports: boolean, test?: RegExp | ((
|
|
10
|
+
constructor(cacheable: boolean, entries: boolean, imports: boolean, test?: RegExp | ((module: Module) => boolean), backend?: LazyCompilationDefaultBackendOptions);
|
|
11
11
|
apply(compiler: Compiler): void;
|
|
12
12
|
}
|
|
13
13
|
export { LazyCompilationPlugin };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { AssetInfo, RawModuleRuleUse, RawOptions } from "@rspack/binding";
|
|
2
|
-
import type { ResolveRequest } from "../../compiled/enhanced-resolve";
|
|
3
2
|
import type { Compilation } from "../Compilation";
|
|
4
3
|
import type { Compiler } from "../Compiler";
|
|
5
4
|
import type { Module } from "../Module";
|
|
5
|
+
import type { ResolveRequest } from "../Resolver";
|
|
6
6
|
import { type LoaderObject } from "../loader-runner";
|
|
7
7
|
import type { Logger } from "../logging/Logger";
|
|
8
8
|
import type Hash from "../util/hash";
|
package/dist/config/index.d.ts
CHANGED
package/dist/config/types.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import type { Module } from "../Module";
|
|
|
7
7
|
import type ModuleGraph from "../ModuleGraph";
|
|
8
8
|
import type { LazyCompilationDefaultBackendOptions } from "../builtin-plugin/lazy-compilation/backend";
|
|
9
9
|
import type { Chunk } from "../exports";
|
|
10
|
+
import type { ResolveCallback } from "./adapterRuleUse";
|
|
10
11
|
export type FilenameTemplate = string;
|
|
11
12
|
export type Filename = FilenameTemplate | ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
12
13
|
/** Name of the configuration. Used when loading multiple configurations. */
|
|
@@ -886,6 +887,14 @@ export type CssAutoGeneratorOptions = {
|
|
|
886
887
|
};
|
|
887
888
|
/** Generator options for css/module modules. */
|
|
888
889
|
export type CssModuleGeneratorOptions = CssAutoGeneratorOptions;
|
|
890
|
+
/** Generator options for json modules. */
|
|
891
|
+
export type JsonGeneratorOptions = {
|
|
892
|
+
/**
|
|
893
|
+
* Use `JSON.parse` when the JSON string is longer than 20 characters.
|
|
894
|
+
* @default true
|
|
895
|
+
*/
|
|
896
|
+
JSONParse?: boolean;
|
|
897
|
+
};
|
|
889
898
|
export type GeneratorOptionsByModuleTypeKnown = {
|
|
890
899
|
/** Generator options for asset modules. */
|
|
891
900
|
asset?: AssetGeneratorOptions;
|
|
@@ -899,6 +908,8 @@ export type GeneratorOptionsByModuleTypeKnown = {
|
|
|
899
908
|
"css/auto"?: CssAutoGeneratorOptions;
|
|
900
909
|
/** Generator options for css/module modules. */
|
|
901
910
|
"css/module"?: CssModuleGeneratorOptions;
|
|
911
|
+
/** Generator options for json modules. */
|
|
912
|
+
json?: JsonGeneratorOptions;
|
|
902
913
|
};
|
|
903
914
|
export type GeneratorOptionsByModuleTypeUnknown = Record<string, Record<string, any>>;
|
|
904
915
|
/** Options for module.generator */
|
|
@@ -974,7 +985,7 @@ export type ExternalItemFunctionData = {
|
|
|
974
985
|
/**
|
|
975
986
|
* Get a resolve function with the current resolver options.
|
|
976
987
|
*/
|
|
977
|
-
getResolve?: (options?: ResolveOptions) => ((context: string, request: string, callback:
|
|
988
|
+
getResolve?: (options?: ResolveOptions) => ((context: string, request: string, callback: ResolveCallback) => void) | ((context: string, request: string) => Promise<string>);
|
|
978
989
|
};
|
|
979
990
|
/**
|
|
980
991
|
* Prevent bundling of certain imported package and instead retrieve these external dependencies at runtime.
|
|
@@ -2026,6 +2037,11 @@ export type RspackOptions = {
|
|
|
2026
2037
|
* An array of dependencies required by the project.
|
|
2027
2038
|
*/
|
|
2028
2039
|
dependencies?: Dependencies;
|
|
2040
|
+
/**
|
|
2041
|
+
* Configuration files to extend from. The configurations are merged from right to left,
|
|
2042
|
+
* with the rightmost configuration taking precedence(only works when using @rspack/cli).
|
|
2043
|
+
*/
|
|
2044
|
+
extends?: string | string[];
|
|
2029
2045
|
/**
|
|
2030
2046
|
* The entry point of the application.
|
|
2031
2047
|
*/
|