@rspack/core 1.0.0-beta.0 → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChunkGroup.d.ts +1 -0
- package/dist/ChunkGroup.js +3 -0
- package/dist/Compilation.d.ts +19 -1
- package/dist/Compiler.d.ts +11 -10
- package/dist/Compiler.js +16 -16
- package/dist/ExecuteModulePlugin.d.ts +0 -1
- package/dist/ExecuteModulePlugin.js +0 -1
- package/dist/Module.d.ts +2 -2
- package/dist/Module.js +1 -1
- package/dist/MultiCompiler.js +1 -1
- package/dist/NormalModule.d.ts +1 -0
- package/dist/NormalModule.js +1 -0
- package/dist/Resolver.d.ts +1 -2
- package/dist/RspackError.js +1 -1
- package/dist/Stats.js +22 -2
- package/dist/Template.js +2 -2
- package/dist/builtin-loader/lightningcss/index.js +1 -1
- 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 +31 -31
- 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/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/DefinePlugin.js +1 -1
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +3 -3
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.js +1 -1
- package/dist/builtin-plugin/EnableLibraryPlugin.js +1 -6
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +3 -3
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.js +1 -1
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EntryPlugin.d.ts +3 -2
- package/dist/builtin-plugin/EntryPlugin.js +1 -0
- 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 +5 -5
- package/dist/builtin-plugin/ExternalsPlugin.js +1 -1
- package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.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 +9 -9
- 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/JavascriptModulesPlugin.d.ts +0 -1
- package/dist/builtin-plugin/JavascriptModulesPlugin.js +1 -1
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LightningCssMiminizerRspackPlugin.d.ts +4 -11
- 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/NaturalChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NaturalModuleIdsPlugin.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/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/SwcCssMinimizerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +2 -3
- 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/css-extract/hmr/hotModuleReplacement.js +3 -5
- package/dist/builtin-plugin/css-extract/hmr/normalizeUrl.js +7 -5
- package/dist/builtin-plugin/css-extract/loader.d.ts +8 -3
- package/dist/builtin-plugin/css-extract/loader.js +27 -22
- package/dist/builtin-plugin/lazy-compilation/backend.js +4 -4
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -1
- package/dist/config/adapter.js +16 -2
- package/dist/config/adapterRuleUse.d.ts +2 -6
- package/dist/config/adapterRuleUse.js +10 -9
- package/dist/config/defaults.js +28 -42
- package/dist/config/normalization.d.ts +7 -3
- package/dist/config/normalization.js +7 -2
- package/dist/config/zod.d.ts +1634 -1093
- package/dist/config/zod.js +31 -2
- package/dist/container/ContainerReferencePlugin.d.ts +1 -1
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
- package/dist/container/default.runtime.js +1 -1
- package/dist/exports.d.ts +1 -1
- package/dist/lib/AbstractMethodError.d.ts +12 -3
- package/dist/lib/AbstractMethodError.js +29 -22
- package/dist/lib/Cache.d.ts +40 -46
- package/dist/lib/Cache.js +43 -78
- package/dist/lib/CacheFacade.d.ts +119 -143
- package/dist/lib/CacheFacade.js +123 -124
- package/dist/lib/Dependency.d.ts +23 -0
- package/dist/lib/Dependency.js +11 -0
- package/dist/lib/EntryOptionPlugin.d.ts +19 -2
- package/dist/lib/EntryOptionPlugin.js +22 -6
- package/dist/lib/EnvironmentPlugin.d.ts +17 -10
- package/dist/lib/EnvironmentPlugin.js +16 -17
- package/dist/lib/HookWebpackError.d.ts +27 -33
- package/dist/lib/HookWebpackError.js +33 -34
- package/dist/lib/IgnoreWarningsPlugin.d.ts +25 -0
- package/dist/lib/{ignoreWarningsPlugin.js → IgnoreWarningsPlugin.js} +17 -0
- package/dist/lib/LoaderOptionsPlugin.d.ts +18 -9
- package/dist/lib/LoaderOptionsPlugin.js +38 -14
- package/dist/lib/LoaderTargetPlugin.d.ts +17 -8
- package/dist/lib/LoaderTargetPlugin.js +17 -15
- package/dist/lib/ModuleFilenameHelpers.d.ts +10 -1
- package/dist/lib/ModuleFilenameHelpers.js +10 -1
- package/dist/lib/NormalModuleReplacementPlugin.d.ts +15 -5
- package/dist/lib/NormalModuleReplacementPlugin.js +15 -5
- package/dist/lib/WebpackError.d.ts +23 -22
- package/dist/lib/WebpackError.js +15 -35
- package/dist/lib/cache/MemoryCachePlugin.d.ts +5 -0
- package/dist/lib/cache/MemoryCachePlugin.js +40 -0
- package/dist/lib/cache/getLazyHashedEtag.d.ts +24 -24
- package/dist/lib/cache/getLazyHashedEtag.js +20 -23
- package/dist/lib/cache/mergeEtags.d.ts +15 -9
- package/dist/lib/cache/mergeEtags.js +18 -11
- package/dist/lib/formatLocation.d.ts +14 -9
- package/dist/lib/formatLocation.js +17 -15
- package/dist/loader-runner/index.js +6 -7
- package/dist/loader-runner/loadLoader.js +8 -11
- package/dist/logging/Logger.js +3 -3
- package/dist/logging/createConsoleLogger.d.ts +26 -6
- package/dist/logging/createConsoleLogger.js +21 -58
- package/dist/logging/runtime.d.ts +4 -10
- package/dist/logging/runtime.js +8 -23
- package/dist/logging/truncateArgs.d.ts +4 -4
- package/dist/logging/truncateArgs.js +5 -10
- package/dist/node/NodeEnvironmentPlugin.js +2 -2
- package/dist/node/NodeWatchFileSystem.js +6 -6
- package/dist/node/nodeConsole.d.ts +7 -21
- package/dist/node/nodeConsole.js +29 -36
- package/dist/rspackOptionsApply.d.ts +0 -1
- package/dist/rspackOptionsApply.js +10 -9
- package/dist/sharing/ProvideSharedPlugin.d.ts +20 -19
- package/dist/sharing/ProvideSharedPlugin.js +26 -17
- package/dist/sharing/SharePlugin.d.ts +3 -0
- package/dist/sharing/SharePlugin.js +4 -1
- package/dist/stats/DefaultStatsFactoryPlugin.js +187 -96
- package/dist/stats/DefaultStatsPresetPlugin.js +1 -2
- package/dist/stats/DefaultStatsPrinterPlugin.js +18 -19
- package/dist/stats/StatsFactory.d.ts +2 -1
- package/dist/stats/StatsFactory.js +2 -6
- package/dist/stats/statsFactoryUtils.d.ts +63 -23
- package/dist/util/SizeFormatHelpers.js +1 -1
- package/dist/util/bindingVersionCheck.js +3 -3
- package/dist/util/cleverMerge.js +3 -2
- package/dist/util/comparators.d.ts +2 -2
- package/dist/util/comparators.js +5 -4
- package/dist/util/createHash.js +1 -1
- package/dist/util/fs.js +2 -2
- package/dist/util/identifier.js +2 -2
- package/dist/util/index.js +1 -1
- package/dist/util/memoize.js +1 -4
- package/dist/util/smartGrouping.js +4 -6
- package/dist/util/webpack.d.ts +1 -1
- package/dist/util/webpack.js +2 -1
- package/module.d.ts +1 -1
- package/package.json +3 -3
- package/compiled/enhanced-resolve/index.js +0 -5566
- package/dist/lib/ignoreWarningsPlugin.d.ts +0 -7
|
@@ -3,7 +3,7 @@ export declare const CommonJsChunkFormatPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -8,7 +8,7 @@ export declare const CopyRspackPlugin: {
|
|
|
8
8
|
new (copy: CopyRspackPluginOptions): {
|
|
9
9
|
name: BuiltinPluginName;
|
|
10
10
|
_args: [copy: CopyRspackPluginOptions];
|
|
11
|
-
affectedHooks: "done" | "
|
|
11
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
12
12
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
13
13
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
14
14
|
};
|
|
@@ -3,7 +3,7 @@ export declare const CssModulesPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const DataUriPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -4,7 +4,7 @@ export declare const DefinePlugin: {
|
|
|
4
4
|
new (define: DefinePluginOptions): {
|
|
5
5
|
name: BuiltinPluginName;
|
|
6
6
|
_args: [define: DefinePluginOptions];
|
|
7
|
-
affectedHooks: "done" | "
|
|
7
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
8
8
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
9
9
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
10
10
|
};
|
|
@@ -19,7 +19,7 @@ const normalizeValue = (define, supportsBigIntLiteral) => {
|
|
|
19
19
|
return p.toString();
|
|
20
20
|
}
|
|
21
21
|
if (typeof p === "function") {
|
|
22
|
-
return
|
|
22
|
+
return `(${p.toString()})`;
|
|
23
23
|
}
|
|
24
24
|
if (typeof p === "bigint") {
|
|
25
25
|
return supportsBigIntLiteral ? `${p}n` : `BigInt("${p}")`;
|
|
@@ -3,7 +3,7 @@ export declare const DeterministicChunkIdsPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const DeterministicModuleIdsPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -4,7 +4,7 @@ export declare const DynamicEntryPlugin: {
|
|
|
4
4
|
new (context: string, entry: EntryDynamicNormalized): {
|
|
5
5
|
name: BuiltinPluginName;
|
|
6
6
|
_args: [context: string, entry: EntryDynamicNormalized];
|
|
7
|
-
affectedHooks: "done" | "
|
|
7
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
8
8
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
9
9
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
10
10
|
};
|
|
@@ -3,7 +3,7 @@ export declare const ElectronTargetPlugin: {
|
|
|
3
3
|
new (context?: string | undefined): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [context?: string | undefined];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
2
|
export declare const EnableChunkLoadingPlugin: {
|
|
3
|
-
new (type:
|
|
3
|
+
new (type: string): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
|
-
_args: [type:
|
|
6
|
-
affectedHooks: "done" | "
|
|
5
|
+
_args: [type: string];
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,4 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.EnableChunkLoadingPlugin = void 0;
|
|
4
4
|
const binding_1 = require("@rspack/binding");
|
|
5
5
|
const base_1 = require("./base");
|
|
6
|
-
exports.EnableChunkLoadingPlugin = (0, base_1.create)(binding_1.BuiltinPluginName.EnableChunkLoadingPlugin, type => type);
|
|
6
|
+
exports.EnableChunkLoadingPlugin = (0, base_1.create)(binding_1.BuiltinPluginName.EnableChunkLoadingPlugin, (type) => type);
|
|
@@ -23,12 +23,7 @@ class EnableLibraryPlugin extends base_1.RspackBuiltinPlugin {
|
|
|
23
23
|
}
|
|
24
24
|
static checkEnabled(compiler, type) {
|
|
25
25
|
if (!getEnabledTypes(compiler).has(type)) {
|
|
26
|
-
throw new Error(`Library type "${type}" is not enabled. `
|
|
27
|
-
"EnableLibraryPlugin need to be used to enable this type of library. " +
|
|
28
|
-
'This usually happens through the "output.enabledLibraryTypes" option. ' +
|
|
29
|
-
'If you are using a function as entry which sets "library", you need to add all potential library types to "output.enabledLibraryTypes". ' +
|
|
30
|
-
"These types are enabled: " +
|
|
31
|
-
Array.from(getEnabledTypes(compiler)).join(", "));
|
|
26
|
+
throw new Error(`Library type "${type}" is not enabled. EnableLibraryPlugin need to be used to enable this type of library. This usually happens through the "output.enabledLibraryTypes" option. If you are using a function as entry which sets "library", you need to add all potential library types to "output.enabledLibraryTypes". These types are enabled: ${Array.from(getEnabledTypes(compiler)).join(", ")}`);
|
|
32
27
|
}
|
|
33
28
|
}
|
|
34
29
|
raw(compiler) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
2
|
export declare const EnableWasmLoadingPlugin: {
|
|
3
|
-
new (type:
|
|
3
|
+
new (type: string): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
|
-
_args: [type:
|
|
6
|
-
affectedHooks: "done" | "
|
|
5
|
+
_args: [type: string];
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,4 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.EnableWasmLoadingPlugin = void 0;
|
|
4
4
|
const binding_1 = require("@rspack/binding");
|
|
5
5
|
const base_1 = require("./base");
|
|
6
|
-
exports.EnableWasmLoadingPlugin = (0, base_1.create)(binding_1.BuiltinPluginName.EnableWasmLoadingPlugin, type => type);
|
|
6
|
+
exports.EnableWasmLoadingPlugin = (0, base_1.create)(binding_1.BuiltinPluginName.EnableWasmLoadingPlugin, (type) => type);
|
|
@@ -3,7 +3,7 @@ export declare const EnsureChunkConditionsPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BuiltinPluginName, type RawEntryOptions } from "@rspack/binding";
|
|
2
|
-
import { type ChunkLoading, type EntryRuntime, type Filename, type LibraryOptions, type PublicPath } from "../config";
|
|
2
|
+
import { type ChunkLoading, type EntryRuntime, type Filename, type Layer, type LibraryOptions, type PublicPath } from "../config";
|
|
3
3
|
export type EntryOptions = {
|
|
4
4
|
name?: string;
|
|
5
5
|
runtime?: EntryRuntime;
|
|
@@ -9,13 +9,14 @@ export type EntryOptions = {
|
|
|
9
9
|
baseUri?: string;
|
|
10
10
|
filename?: Filename;
|
|
11
11
|
library?: LibraryOptions;
|
|
12
|
+
layer?: Layer;
|
|
12
13
|
dependOn?: string[];
|
|
13
14
|
};
|
|
14
15
|
export declare const EntryPlugin: {
|
|
15
16
|
new (context: string, entry: string, options?: string | EntryOptions | undefined): {
|
|
16
17
|
name: BuiltinPluginName;
|
|
17
18
|
_args: [context: string, entry: string, options?: string | EntryOptions | undefined];
|
|
18
|
-
affectedHooks: "done" | "
|
|
19
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
19
20
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
20
21
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
21
22
|
};
|
|
@@ -4,7 +4,7 @@ export declare const EvalDevToolModulePlugin: {
|
|
|
4
4
|
new (options: RawEvalDevToolModulePluginOptions): {
|
|
5
5
|
name: BuiltinPluginName;
|
|
6
6
|
_args: [options: RawEvalDevToolModulePluginOptions];
|
|
7
|
-
affectedHooks: "done" | "
|
|
7
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
8
8
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
9
9
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
10
10
|
};
|
|
@@ -4,7 +4,7 @@ export declare const EvalSourceMapDevToolPlugin: {
|
|
|
4
4
|
new (options: SourceMapDevToolPluginOptions): {
|
|
5
5
|
name: BuiltinPluginName;
|
|
6
6
|
_args: [options: SourceMapDevToolPluginOptions];
|
|
7
|
-
affectedHooks: "done" | "
|
|
7
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
8
8
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
9
9
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
10
10
|
};
|
|
@@ -7,7 +7,7 @@ export declare const ExternalsPlugin: {
|
|
|
7
7
|
contextInfo?: {
|
|
8
8
|
issuer: string;
|
|
9
9
|
} | undefined;
|
|
10
|
-
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "
|
|
10
|
+
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
|
|
11
11
|
context?: string | undefined;
|
|
12
12
|
dependencyType?: string | undefined;
|
|
13
13
|
request?: string | undefined;
|
|
@@ -21,7 +21,7 @@ export declare const ExternalsPlugin: {
|
|
|
21
21
|
contextInfo?: {
|
|
22
22
|
issuer: string;
|
|
23
23
|
} | undefined;
|
|
24
|
-
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "
|
|
24
|
+
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
|
|
25
25
|
context?: string | undefined;
|
|
26
26
|
dependencyType?: string | undefined;
|
|
27
27
|
request?: string | undefined;
|
|
@@ -37,7 +37,7 @@ export declare const ExternalsPlugin: {
|
|
|
37
37
|
contextInfo?: {
|
|
38
38
|
issuer: string;
|
|
39
39
|
} | undefined;
|
|
40
|
-
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "
|
|
40
|
+
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
|
|
41
41
|
context?: string | undefined;
|
|
42
42
|
dependencyType?: string | undefined;
|
|
43
43
|
request?: string | undefined;
|
|
@@ -51,7 +51,7 @@ export declare const ExternalsPlugin: {
|
|
|
51
51
|
contextInfo?: {
|
|
52
52
|
issuer: string;
|
|
53
53
|
} | undefined;
|
|
54
|
-
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "
|
|
54
|
+
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
|
|
55
55
|
context?: string | undefined;
|
|
56
56
|
dependencyType?: string | undefined;
|
|
57
57
|
request?: string | undefined;
|
|
@@ -59,7 +59,7 @@ export declare const ExternalsPlugin: {
|
|
|
59
59
|
issuer: string;
|
|
60
60
|
} | undefined;
|
|
61
61
|
}, ...args_1: unknown[]) => Promise<string | boolean | string[] | Record<string, string | string[]>>))[]];
|
|
62
|
-
affectedHooks: "done" | "
|
|
62
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
63
63
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
64
64
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
65
65
|
};
|
|
@@ -3,7 +3,7 @@ export declare const FetchCompileAsyncWasmPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const FileUriPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const FlagDependencyExportsPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const FlagDependencyUsagePlugin: {
|
|
|
3
3
|
new (global: boolean): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [global: boolean];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -16,9 +16,9 @@ declare const htmlRspackPluginOptions: z.ZodObject<{
|
|
|
16
16
|
favicon: z.ZodOptional<z.ZodString>;
|
|
17
17
|
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
|
|
18
18
|
}, "strict", z.ZodTypeAny, {
|
|
19
|
-
chunks?: string[] | undefined;
|
|
20
|
-
publicPath?: string | undefined;
|
|
21
19
|
filename?: string | undefined;
|
|
20
|
+
publicPath?: string | undefined;
|
|
21
|
+
chunks?: string[] | undefined;
|
|
22
22
|
template?: string | undefined;
|
|
23
23
|
templateContent?: string | undefined;
|
|
24
24
|
templateParameters?: Record<string, string> | undefined;
|
|
@@ -31,9 +31,9 @@ declare const htmlRspackPluginOptions: z.ZodObject<{
|
|
|
31
31
|
favicon?: string | undefined;
|
|
32
32
|
meta?: Record<string, string | Record<string, string>> | undefined;
|
|
33
33
|
}, {
|
|
34
|
-
chunks?: string[] | undefined;
|
|
35
|
-
publicPath?: string | undefined;
|
|
36
34
|
filename?: string | undefined;
|
|
35
|
+
publicPath?: string | undefined;
|
|
36
|
+
chunks?: string[] | undefined;
|
|
37
37
|
template?: string | undefined;
|
|
38
38
|
templateContent?: string | undefined;
|
|
39
39
|
templateParameters?: Record<string, string> | undefined;
|
|
@@ -49,9 +49,9 @@ declare const htmlRspackPluginOptions: z.ZodObject<{
|
|
|
49
49
|
export type HtmlRspackPluginOptions = z.infer<typeof htmlRspackPluginOptions>;
|
|
50
50
|
export declare const HtmlRspackPlugin: {
|
|
51
51
|
new (c?: {
|
|
52
|
-
chunks?: string[] | undefined;
|
|
53
|
-
publicPath?: string | undefined;
|
|
54
52
|
filename?: string | undefined;
|
|
53
|
+
publicPath?: string | undefined;
|
|
54
|
+
chunks?: string[] | undefined;
|
|
55
55
|
template?: string | undefined;
|
|
56
56
|
templateContent?: string | undefined;
|
|
57
57
|
templateParameters?: Record<string, string> | undefined;
|
|
@@ -66,9 +66,9 @@ export declare const HtmlRspackPlugin: {
|
|
|
66
66
|
} | undefined): {
|
|
67
67
|
name: BuiltinPluginName;
|
|
68
68
|
_args: [c?: {
|
|
69
|
-
chunks?: string[] | undefined;
|
|
70
|
-
publicPath?: string | undefined;
|
|
71
69
|
filename?: string | undefined;
|
|
70
|
+
publicPath?: string | undefined;
|
|
71
|
+
chunks?: string[] | undefined;
|
|
72
72
|
template?: string | undefined;
|
|
73
73
|
templateContent?: string | undefined;
|
|
74
74
|
templateParameters?: Record<string, string> | undefined;
|
|
@@ -81,7 +81,7 @@ export declare const HtmlRspackPlugin: {
|
|
|
81
81
|
favicon?: string | undefined;
|
|
82
82
|
meta?: Record<string, string | Record<string, string>> | undefined;
|
|
83
83
|
} | undefined];
|
|
84
|
-
affectedHooks: "done" | "
|
|
84
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
85
85
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
86
86
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
87
87
|
};
|
|
@@ -3,7 +3,7 @@ export declare const HttpExternalsRspackPlugin: {
|
|
|
3
3
|
new (css: boolean, webAsync: boolean): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [css: boolean, webAsync: boolean];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -9,7 +9,7 @@ export declare const IgnorePlugin: {
|
|
|
9
9
|
new (options: IgnorePluginOptions): {
|
|
10
10
|
name: BuiltinPluginName;
|
|
11
11
|
_args: [options: IgnorePluginOptions];
|
|
12
|
-
affectedHooks: "done" | "
|
|
12
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
13
13
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
14
14
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
15
15
|
};
|
|
@@ -3,7 +3,7 @@ export declare const InferAsyncModulesPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -10,7 +10,6 @@ export type CompilationHooks = {
|
|
|
10
10
|
export declare class JavascriptModulesPlugin extends RspackBuiltinPlugin {
|
|
11
11
|
name: BuiltinPluginName;
|
|
12
12
|
affectedHooks: "compilation";
|
|
13
|
-
constructor();
|
|
14
13
|
raw(): BuiltinPlugin;
|
|
15
14
|
static getCompilationHooks(compilation: Compilation): CompilationHooks;
|
|
16
15
|
}
|
|
@@ -31,7 +31,7 @@ const base_1 = require("./base");
|
|
|
31
31
|
const compilationHooksMap = new WeakMap();
|
|
32
32
|
class JavascriptModulesPlugin extends base_1.RspackBuiltinPlugin {
|
|
33
33
|
constructor() {
|
|
34
|
-
super();
|
|
34
|
+
super(...arguments);
|
|
35
35
|
this.name = binding_1.BuiltinPluginName.JavascriptModulesPlugin;
|
|
36
36
|
this.affectedHooks = "compilation";
|
|
37
37
|
}
|
|
@@ -4,7 +4,7 @@ export declare const JsLoaderRspackPlugin: {
|
|
|
4
4
|
new (compiler: Compiler): {
|
|
5
5
|
name: BuiltinPluginName;
|
|
6
6
|
_args: [compiler: Compiler];
|
|
7
|
-
affectedHooks: "done" | "
|
|
7
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
8
8
|
raw(compiler: Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
9
9
|
apply(compiler: Compiler): void;
|
|
10
10
|
};
|
|
@@ -3,7 +3,7 @@ export declare const JsonModulesPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import { BuiltinPluginName, type RawLightningCssMinimizerRspackPluginOptions } from "@rspack/binding";
|
|
2
|
-
type
|
|
3
|
-
type MinifyConditions = MinifyCondition | MinifyCondition[];
|
|
4
|
-
export type LightningCssMinimizerRspackPluginOptions = Partial<RawLightningCssMinimizerRspackPluginOptions> & {
|
|
5
|
-
test?: MinifyConditions;
|
|
6
|
-
exclude?: MinifyConditions;
|
|
7
|
-
include?: MinifyConditions;
|
|
8
|
-
};
|
|
2
|
+
export type LightningCssMinimizerRspackPluginOptions = Partial<RawLightningCssMinimizerRspackPluginOptions>;
|
|
9
3
|
export declare const LightningCssMinimizerRspackPlugin: {
|
|
10
|
-
new (options?:
|
|
4
|
+
new (options?: Partial<RawLightningCssMinimizerRspackPluginOptions> | undefined): {
|
|
11
5
|
name: BuiltinPluginName;
|
|
12
|
-
_args: [options?:
|
|
13
|
-
affectedHooks: "done" | "
|
|
6
|
+
_args: [options?: Partial<RawLightningCssMinimizerRspackPluginOptions> | undefined];
|
|
7
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
14
8
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
15
9
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
16
10
|
};
|
|
17
11
|
};
|
|
18
|
-
export {};
|
|
@@ -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" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
12
12
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
13
13
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
14
14
|
};
|
|
@@ -3,7 +3,7 @@ export declare const MangleExportsPlugin: {
|
|
|
3
3
|
new (deterministic: boolean): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [deterministic: boolean];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|