@rspack/core 1.4.11 → 1.5.0-beta.1
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/Compilation.d.ts +2 -2
- package/dist/Compiler.d.ts +5 -0
- package/dist/Module.d.ts +3 -14
- package/dist/NativeWatchFileSystem.d.ts +3 -1
- package/dist/NormalModuleFactory.d.ts +2 -2
- package/dist/Resolver.d.ts +0 -6
- package/dist/ResolverFactory.d.ts +8 -5
- package/dist/VirtualModulesPlugin.d.ts +12 -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/CssChunkingPlugin.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/NormalModuleReplacementPlugin.d.ts +10 -0
- 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/RslibPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RstestPlugin.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 +2 -2
- package/dist/builtin-plugin/html-plugin/plugin.d.ts +1 -1
- package/dist/builtin-plugin/index.d.ts +1 -0
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -1
- package/dist/config/normalization.d.ts +7 -0
- package/dist/config/types.d.ts +20 -4
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
- package/dist/exports.d.ts +11 -3
- package/dist/index.js +298 -256
- package/dist/loader-runner/loadLoader.d.ts +2 -1
- package/dist/loader-runner/utils.d.ts +2 -1
- package/dist/schema/config.d.ts +60 -47
- package/dist/schema/loaders.d.ts +5 -5
- package/dist/schema/plugins.d.ts +10 -10
- package/dist/util/bindingVersionCheck.d.ts +1 -1
- package/dist/util/require.d.ts +3 -0
- package/dist/worker.js +93 -59
- package/module.d.ts +9 -10
- package/package.json +11 -9
- package/dist/lib/NormalModuleReplacementPlugin.d.ts +0 -29
@@ -7,7 +7,7 @@ export declare const LimitChunkCountPlugin: {
|
|
7
7
|
new (options: LimitChunkCountOptions): {
|
8
8
|
name: string;
|
9
9
|
_args: [options: LimitChunkCountOptions];
|
10
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
10
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
11
11
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
12
12
|
apply(compiler: import("..").Compiler): void;
|
13
13
|
};
|
@@ -2,7 +2,7 @@ export declare const MergeDuplicateChunksPlugin: {
|
|
2
2
|
new (): {
|
3
3
|
name: string;
|
4
4
|
_args: [];
|
5
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
5
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
6
6
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
7
7
|
apply(compiler: import("..").Compiler): void;
|
8
8
|
};
|
@@ -2,7 +2,7 @@ export declare const ModuleChunkFormatPlugin: {
|
|
2
2
|
new (): {
|
3
3
|
name: string;
|
4
4
|
_args: [];
|
5
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
5
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
6
6
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
7
7
|
apply(compiler: import("..").Compiler): void;
|
8
8
|
};
|
@@ -2,7 +2,7 @@ export declare const ModuleInfoHeaderPlugin: {
|
|
2
2
|
new (verbose: any): {
|
3
3
|
name: string;
|
4
4
|
_args: [verbose: any];
|
5
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
5
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
6
6
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
7
7
|
apply(compiler: import("..").Compiler): void;
|
8
8
|
};
|
@@ -2,7 +2,7 @@ export declare const NamedChunkIdsPlugin: {
|
|
2
2
|
new (): {
|
3
3
|
name: string;
|
4
4
|
_args: [];
|
5
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
5
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
6
6
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
7
7
|
apply(compiler: import("..").Compiler): void;
|
8
8
|
};
|
@@ -2,7 +2,7 @@ export declare const NamedModuleIdsPlugin: {
|
|
2
2
|
new (): {
|
3
3
|
name: string;
|
4
4
|
_args: [];
|
5
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
5
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
6
6
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
7
7
|
apply(compiler: import("..").Compiler): void;
|
8
8
|
};
|
@@ -2,7 +2,7 @@ export declare const NoEmitOnErrorsPlugin: {
|
|
2
2
|
new (): {
|
3
3
|
name: string;
|
4
4
|
_args: [];
|
5
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
5
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
6
6
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
7
7
|
apply(compiler: import("..").Compiler): void;
|
8
8
|
};
|
@@ -2,7 +2,7 @@ export declare const NodeTargetPlugin: {
|
|
2
2
|
new (): {
|
3
3
|
name: string;
|
4
4
|
_args: [];
|
5
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
5
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
6
6
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
7
7
|
apply(compiler: import("..").Compiler): void;
|
8
8
|
};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import type { ResolveData } from "../Module";
|
2
|
+
export declare const NormalModuleReplacementPlugin: {
|
3
|
+
new (resourceRegExp: RegExp, newResource: string | ((data: ResolveData) => void)): {
|
4
|
+
name: string;
|
5
|
+
_args: [resourceRegExp: RegExp, newResource: string | ((data: ResolveData) => void)];
|
6
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
7
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
8
|
+
apply(compiler: import("..").Compiler): void;
|
9
|
+
};
|
10
|
+
};
|
@@ -3,7 +3,7 @@ export declare const OccurrenceChunkIdsPlugin: {
|
|
3
3
|
new (options?: RawOccurrenceChunkIdsPluginOptions | undefined): {
|
4
4
|
name: string;
|
5
5
|
_args: [options?: RawOccurrenceChunkIdsPluginOptions | undefined];
|
6
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
6
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "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: string;
|
6
6
|
_args: [progress?: ProgressPluginArgument];
|
7
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
7
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "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 ProvidePlugin: {
|
|
3
3
|
new (provide: ProvidePluginOptions): {
|
4
4
|
name: string;
|
5
5
|
_args: [provide: ProvidePluginOptions];
|
6
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
6
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "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
|
};
|
@@ -2,7 +2,7 @@ export declare const RealContentHashPlugin: {
|
|
2
2
|
new (): {
|
3
3
|
name: string;
|
4
4
|
_args: [];
|
5
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
5
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
6
6
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
7
7
|
apply(compiler: import("..").Compiler): void;
|
8
8
|
};
|
@@ -2,7 +2,7 @@ export declare const RemoveDuplicateModulesPlugin: {
|
|
2
2
|
new (): {
|
3
3
|
name: string;
|
4
4
|
_args: [];
|
5
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
5
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
6
6
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
7
7
|
apply(compiler: import("..").Compiler): void;
|
8
8
|
};
|
@@ -2,7 +2,7 @@ export declare const RemoveEmptyChunksPlugin: {
|
|
2
2
|
new (): {
|
3
3
|
name: string;
|
4
4
|
_args: [];
|
5
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
5
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
6
6
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
7
7
|
apply(compiler: import("..").Compiler): void;
|
8
8
|
};
|
@@ -18,7 +18,7 @@ declare const RsdoctorPluginImpl: {
|
|
18
18
|
new (c?: RsdoctorPluginOptions | undefined): {
|
19
19
|
name: string;
|
20
20
|
_args: [c?: RsdoctorPluginOptions | undefined];
|
21
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
21
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
22
22
|
raw(compiler: Compiler): import("@rspack/binding").BuiltinPlugin;
|
23
23
|
apply(compiler: Compiler): void;
|
24
24
|
};
|
@@ -4,7 +4,7 @@ export declare const RslibPlugin: {
|
|
4
4
|
new (rslib: RawRslibPluginOptions): {
|
5
5
|
name: string;
|
6
6
|
_args: [rslib: RawRslibPluginOptions];
|
7
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
7
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "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 RstestPlugin: {
|
|
4
4
|
new (rstest: RawRstestPluginOptions): {
|
5
5
|
name: string;
|
6
6
|
_args: [rstest: RawRstestPluginOptions];
|
7
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
7
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "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 RuntimeChunkPlugin: {
|
|
4
4
|
new (options: RawRuntimeChunkOptions): {
|
5
5
|
name: string;
|
6
6
|
_args: [options: RawRuntimeChunkOptions];
|
7
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
7
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "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: string;
|
9
9
|
_args: [];
|
10
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
10
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
11
11
|
raw(compiler: import("..").Compiler): binding.BuiltinPlugin;
|
12
12
|
apply(compiler: import("..").Compiler): void;
|
13
13
|
};
|
@@ -2,7 +2,7 @@ export declare const SideEffectsFlagPlugin: {
|
|
2
2
|
new (): {
|
3
3
|
name: string;
|
4
4
|
_args: [];
|
5
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
5
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
6
6
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
7
7
|
apply(compiler: import("..").Compiler): void;
|
8
8
|
};
|
@@ -12,7 +12,7 @@ export declare const SizeLimitsPlugin: {
|
|
12
12
|
maxAssetSize?: number;
|
13
13
|
maxEntrypointSize?: number;
|
14
14
|
}];
|
15
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
15
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
16
16
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
17
17
|
apply(compiler: import("..").Compiler): void;
|
18
18
|
};
|
@@ -4,7 +4,7 @@ export declare const SourceMapDevToolPlugin: {
|
|
4
4
|
new (options: SourceMapDevToolPluginOptions): {
|
5
5
|
name: string;
|
6
6
|
_args: [options: SourceMapDevToolPluginOptions];
|
7
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
7
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "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: string;
|
22
22
|
_args: [options: NativeSubresourceIntegrityPluginOptions];
|
23
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
23
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
24
24
|
raw(compiler: Compiler): import("@rspack/binding").BuiltinPlugin;
|
25
25
|
apply(compiler: Compiler): void;
|
26
26
|
};
|
@@ -206,7 +206,7 @@ export declare const SwcJsMinimizerRspackPlugin: {
|
|
206
206
|
new (options?: SwcJsMinimizerRspackPluginOptions | undefined): {
|
207
207
|
name: string;
|
208
208
|
_args: [options?: SwcJsMinimizerRspackPluginOptions | undefined];
|
209
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
209
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
210
210
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
211
211
|
apply(compiler: import("..").Compiler): void;
|
212
212
|
};
|
@@ -2,7 +2,7 @@ export declare const WarnCaseSensitiveModulesPlugin: {
|
|
2
2
|
new (): {
|
3
3
|
name: string;
|
4
4
|
_args: [];
|
5
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
5
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
6
6
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
7
7
|
apply(compiler: import("..").Compiler): void;
|
8
8
|
};
|
@@ -14,7 +14,7 @@ export declare function create<T extends any[], R>(name: binding.BuiltinPluginNa
|
|
14
14
|
new (...args: T): {
|
15
15
|
name: string;
|
16
16
|
_args: T;
|
17
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
17
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
18
18
|
raw(compiler: Compiler): binding.BuiltinPlugin;
|
19
19
|
apply(compiler: Compiler): void;
|
20
20
|
};
|
@@ -37,7 +37,7 @@ export declare function createNativePlugin<T extends any[], R>(name: CustomPlugi
|
|
37
37
|
new (...args: T): {
|
38
38
|
name: string;
|
39
39
|
_args: T;
|
40
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
40
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
41
41
|
raw(compiler: Compiler): binding.BuiltinPlugin;
|
42
42
|
apply(compiler: Compiler): void;
|
43
43
|
};
|
@@ -7,7 +7,7 @@ declare const HtmlRspackPluginImpl: {
|
|
7
7
|
new (c?: HtmlRspackPluginOptions | undefined): {
|
8
8
|
name: string;
|
9
9
|
_args: [c?: HtmlRspackPluginOptions | undefined];
|
10
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
10
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
11
11
|
raw(compiler: Compiler): import("@rspack/binding").BuiltinPlugin;
|
12
12
|
apply(compiler: Compiler): void;
|
13
13
|
};
|
@@ -58,6 +58,7 @@ export * from "./NaturalChunkIdsPlugin";
|
|
58
58
|
export * from "./NaturalModuleIdsPlugin";
|
59
59
|
export * from "./NodeTargetPlugin";
|
60
60
|
export * from "./NoEmitOnErrorsPlugin";
|
61
|
+
export * from "./NormalModuleReplacementPlugin";
|
61
62
|
export * from "./OccurrenceChunkIdsPlugin";
|
62
63
|
export * from "./ProgressPlugin";
|
63
64
|
export * from "./ProvidePlugin";
|
@@ -17,7 +17,7 @@ export declare const BuiltinLazyCompilationPlugin: {
|
|
17
17
|
data: string;
|
18
18
|
client: string;
|
19
19
|
}, cacheable: boolean, entries: boolean, imports: boolean, test?: RegExp | ((module: Module) => boolean) | undefined];
|
20
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
20
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
21
21
|
raw(compiler: import("../..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
22
22
|
apply(compiler: import("../..").Compiler): void;
|
23
23
|
};
|
@@ -95,6 +95,11 @@ export type ExperimentCacheNormalized = boolean | {
|
|
95
95
|
};
|
96
96
|
export interface ExperimentsNormalized {
|
97
97
|
cache?: ExperimentCacheNormalized;
|
98
|
+
/**
|
99
|
+
* @deprecated This option is deprecated and will be removed in future versions.
|
100
|
+
*
|
101
|
+
* Please use the Configuration top-level `lazyCompilation` option instead.
|
102
|
+
*/
|
98
103
|
lazyCompilation?: false | LazyCompilationOptions;
|
99
104
|
asyncWebAssembly?: boolean;
|
100
105
|
outputModule?: boolean;
|
@@ -111,6 +116,7 @@ export interface ExperimentsNormalized {
|
|
111
116
|
inlineConst?: boolean;
|
112
117
|
inlineEnum?: boolean;
|
113
118
|
typeReexportsPresence?: boolean;
|
119
|
+
lazyBarrel?: boolean;
|
114
120
|
nativeWatcher?: boolean;
|
115
121
|
}
|
116
122
|
export type IgnoreWarningsNormalized = ((warning: WebpackError, compilation: Compilation) => boolean)[];
|
@@ -143,6 +149,7 @@ export interface RspackOptionsNormalized {
|
|
143
149
|
optimization: Optimization;
|
144
150
|
plugins: Plugins;
|
145
151
|
experiments: ExperimentsNormalized;
|
152
|
+
lazyCompilation?: false | LazyCompilationOptions;
|
146
153
|
watch?: Watch;
|
147
154
|
watchOptions: WatchOptions;
|
148
155
|
devServer?: DevServer;
|
package/dist/config/types.d.ts
CHANGED
@@ -763,6 +763,11 @@ export type JavascriptParserOptions = {
|
|
763
763
|
* @default true
|
764
764
|
* */
|
765
765
|
exprContextCritical?: boolean;
|
766
|
+
/**
|
767
|
+
* Enable warnings for unknown dynamic dependencies
|
768
|
+
* @default true
|
769
|
+
* */
|
770
|
+
unknownContextCritical?: boolean;
|
766
771
|
/**
|
767
772
|
* Enable warnings for partial dynamic dependencies
|
768
773
|
* @default false
|
@@ -1971,6 +1976,7 @@ export type Experiments = {
|
|
1971
1976
|
cache?: ExperimentCacheOptions;
|
1972
1977
|
/**
|
1973
1978
|
* Enable lazy compilation.
|
1979
|
+
* @deprecated Please use the configuration top-level `lazyCompilation` option instead.
|
1974
1980
|
* @default false
|
1975
1981
|
*/
|
1976
1982
|
lazyCompilation?: boolean | LazyCompilationOptions;
|
@@ -2041,15 +2047,15 @@ export type Experiments = {
|
|
2041
2047
|
*/
|
2042
2048
|
useInputFileSystem?: UseInputFileSystem;
|
2043
2049
|
/**
|
2044
|
-
* Enable
|
2050
|
+
* Enable native watcher
|
2045
2051
|
* @default false
|
2046
2052
|
*/
|
2047
|
-
|
2053
|
+
nativeWatcher?: boolean;
|
2048
2054
|
/**
|
2049
|
-
* Enable
|
2055
|
+
* Enable inline const feature
|
2050
2056
|
* @default false
|
2051
2057
|
*/
|
2052
|
-
|
2058
|
+
inlineConst?: boolean;
|
2053
2059
|
/**
|
2054
2060
|
* Enable inline enum feature
|
2055
2061
|
* @default false
|
@@ -2060,6 +2066,11 @@ export type Experiments = {
|
|
2060
2066
|
* @default false
|
2061
2067
|
*/
|
2062
2068
|
typeReexportsPresence?: boolean;
|
2069
|
+
/**
|
2070
|
+
* Enable lazy make side effects free barrel file
|
2071
|
+
* @default false
|
2072
|
+
*/
|
2073
|
+
lazyBarrel?: boolean;
|
2063
2074
|
};
|
2064
2075
|
export type Watch = boolean;
|
2065
2076
|
/** Options for watch mode. */
|
@@ -2277,6 +2288,11 @@ export type RspackOptions = {
|
|
2277
2288
|
* Performance optimization options.
|
2278
2289
|
*/
|
2279
2290
|
performance?: Performance;
|
2291
|
+
/**
|
2292
|
+
* Enable lazy compilation.
|
2293
|
+
* @default false
|
2294
|
+
*/
|
2295
|
+
lazyCompilation?: boolean | LazyCompilationOptions;
|
2280
2296
|
};
|
2281
2297
|
/** Configuration for Rspack */
|
2282
2298
|
export type Configuration = RspackOptions;
|
@@ -5,7 +5,7 @@ export declare const ModuleFederationRuntimePlugin: {
|
|
5
5
|
new (options?: ModuleFederationRuntimeOptions | undefined): {
|
6
6
|
name: string;
|
7
7
|
_args: [options?: ModuleFederationRuntimeOptions | undefined];
|
8
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
8
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
9
9
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
10
10
|
apply(compiler: import("..").Compiler): void;
|
11
11
|
};
|
package/dist/exports.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
declare const rspackVersion: string;
|
2
2
|
declare const version: string;
|
3
3
|
export { rspackVersion, version };
|
4
|
-
export type { Asset, AssetInfo, Assets, CompilationParams, LogEntry } from "./Compilation";
|
4
|
+
export type { Asset, AssetInfo, Assets, ChunkPathData, CompilationParams, LogEntry, PathData } from "./Compilation";
|
5
5
|
export { Compilation } from "./Compilation";
|
6
6
|
export { Compiler } from "./Compiler";
|
7
7
|
export type { MultiCompilerOptions, MultiRspackOptions } from "./MultiCompiler";
|
@@ -56,7 +56,6 @@ export { default as EntryOptionPlugin } from "./lib/EntryOptionPlugin";
|
|
56
56
|
export { EnvironmentPlugin } from "./lib/EnvironmentPlugin";
|
57
57
|
export { LoaderOptionsPlugin } from "./lib/LoaderOptionsPlugin";
|
58
58
|
export { LoaderTargetPlugin } from "./lib/LoaderTargetPlugin";
|
59
|
-
export { NormalModuleReplacementPlugin } from "./lib/NormalModuleReplacementPlugin";
|
60
59
|
export type { OutputFileSystem } from "./util/fs";
|
61
60
|
import { FetchCompileAsyncWasmPlugin, lazyCompilationMiddleware, SubresourceIntegrityPlugin } from "./builtin-plugin";
|
62
61
|
interface Web {
|
@@ -133,9 +132,11 @@ export declare const sharing: {
|
|
133
132
|
export type { FeatureOptions as LightningcssFeatureOptions, LoaderOptions as LightningcssLoaderOptions } from "./builtin-loader/lightningcss/index";
|
134
133
|
export type { SwcLoaderEnvConfig, SwcLoaderEsParserConfig, SwcLoaderJscConfig, SwcLoaderModuleConfig, SwcLoaderOptions, SwcLoaderParserConfig, SwcLoaderTransformConfig, SwcLoaderTsParserConfig } from "./builtin-loader/swc/index";
|
135
134
|
export type { CircularDependencyRspackPluginOptions, CopyRspackPluginOptions, CssExtractRspackLoaderOptions, CssExtractRspackPluginOptions, EvalDevToolModulePluginOptions, HtmlRspackPluginOptions, LightningCssMinimizerRspackPluginOptions, RsdoctorPluginData, RsdoctorPluginHooks, SourceMapDevToolPluginOptions, SubresourceIntegrityPluginOptions, SwcJsMinimizerRspackPluginOptions } from "./builtin-plugin";
|
136
|
-
export { CircularDependencyRspackPlugin, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, HtmlRspackPlugin, LightningCssMinimizerRspackPlugin, SourceMapDevToolPlugin, SwcJsMinimizerRspackPlugin } from "./builtin-plugin";
|
135
|
+
export { CircularDependencyRspackPlugin, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, HtmlRspackPlugin, LightningCssMinimizerRspackPlugin, NormalModuleReplacementPlugin, SourceMapDevToolPlugin, SwcJsMinimizerRspackPlugin } from "./builtin-plugin";
|
136
|
+
import { EnforceExtension, ResolverFactory, async as resolveAsync, sync as resolveSync } from "@rspack/binding";
|
137
137
|
import { createNativePlugin } from "./builtin-plugin";
|
138
138
|
import { minify, minifySync, transform, transformSync } from "./swc";
|
139
|
+
import { VirtualModulesPlugin } from "./VirtualModulesPlugin";
|
139
140
|
interface Experiments {
|
140
141
|
globalTrace: {
|
141
142
|
register: (filter: string, layer: "logger" | "perfetto", output: string) => Promise<void>;
|
@@ -153,7 +154,14 @@ interface Experiments {
|
|
153
154
|
transformSync: typeof transformSync;
|
154
155
|
minifySync: typeof minifySync;
|
155
156
|
};
|
157
|
+
resolver: {
|
158
|
+
ResolverFactory: typeof ResolverFactory;
|
159
|
+
EnforceExtension: typeof EnforceExtension;
|
160
|
+
async: typeof resolveAsync;
|
161
|
+
sync: typeof resolveSync;
|
162
|
+
};
|
156
163
|
CssChunkingPlugin: typeof CssChunkingPlugin;
|
157
164
|
createNativePlugin: typeof createNativePlugin;
|
165
|
+
VirtualModulesPlugin: typeof VirtualModulesPlugin;
|
158
166
|
}
|
159
167
|
export declare const experiments: Experiments;
|