@ohos-ports/rspack-core 1.1.8-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/LICENSE +22 -0
- package/README.md +25 -0
- package/compiled/@swc/types/index.d.ts +1962 -0
- package/compiled/@swc/types/index.js +19 -0
- package/compiled/@swc/types/license +201 -0
- package/compiled/@swc/types/package.json +1 -0
- package/compiled/browserslist/index.d.ts +1 -0
- package/compiled/browserslist/index.js +2053 -0
- package/compiled/browserslist/license +20 -0
- package/compiled/browserslist/package.json +1 -0
- package/compiled/enhanced-resolve/CachedInputFileSystem.js +664 -0
- package/compiled/enhanced-resolve/index.d.ts +1123 -0
- package/compiled/enhanced-resolve/license +20 -0
- package/compiled/enhanced-resolve/package.json +1 -0
- package/compiled/graceful-fs/index.d.ts +13 -0
- package/compiled/graceful-fs/index.js +1063 -0
- package/compiled/graceful-fs/license +15 -0
- package/compiled/graceful-fs/package.json +1 -0
- package/compiled/watchpack/index.d.ts +216 -0
- package/compiled/watchpack/index.js +2075 -0
- package/compiled/watchpack/license +20 -0
- package/compiled/watchpack/package.json +1 -0
- package/compiled/webpack-sources/index.d.ts +130 -0
- package/compiled/webpack-sources/index.js +3520 -0
- package/compiled/webpack-sources/license +21 -0
- package/compiled/webpack-sources/package.json +1 -0
- package/compiled/zod/index.d.ts +1733 -0
- package/compiled/zod/index.js +4405 -0
- package/compiled/zod/license +21 -0
- package/compiled/zod/package.json +1 -0
- package/dist/Chunk.d.ts +40 -0
- package/dist/ChunkGraph.d.ts +12 -0
- package/dist/ChunkGroup.d.ts +26 -0
- package/dist/Compilation.d.ts +421 -0
- package/dist/Compiler.d.ts +154 -0
- package/dist/ContextModuleFactory.d.ts +13 -0
- package/dist/DependenciesBlock.d.ts +10 -0
- package/dist/Dependency.d.ts +11 -0
- package/dist/Entrypoint.d.ts +8 -0
- package/dist/ErrorHelpers.d.ts +16 -0
- package/dist/ExecuteModulePlugin.d.ts +4 -0
- package/dist/FileSystem.d.ts +29 -0
- package/dist/FileSystemInfo.d.ts +5 -0
- package/dist/Module.d.ts +93 -0
- package/dist/ModuleGraph.d.ts +10 -0
- package/dist/ModuleTypeConstants.d.ts +93 -0
- package/dist/MultiCompiler.d.ts +68 -0
- package/dist/MultiStats.d.ts +22 -0
- package/dist/MultiWatching.d.ts +26 -0
- package/dist/NormalModule.d.ts +12 -0
- package/dist/NormalModuleFactory.d.ts +20 -0
- package/dist/Resolver.d.ts +16 -0
- package/dist/ResolverFactory.d.ts +14 -0
- package/dist/RspackError.d.ts +8 -0
- package/dist/RuleSetCompiler.d.ts +9 -0
- package/dist/RuntimeGlobals.d.ts +324 -0
- package/dist/RuntimeModule.d.ts +32 -0
- package/dist/Stats.d.ts +17 -0
- package/dist/Template.d.ts +77 -0
- package/dist/Watching.d.ts +35 -0
- package/dist/builtin-loader/index.d.ts +1 -0
- package/dist/builtin-loader/lightningcss/index.d.ts +95 -0
- package/dist/builtin-loader/swc/index.d.ts +3 -0
- package/dist/builtin-loader/swc/pluginImport.d.ts +33 -0
- package/dist/builtin-loader/swc/types.d.ts +19 -0
- package/dist/builtin-plugin/APIPlugin.d.ts +10 -0
- package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +10 -0
- package/dist/builtin-plugin/AssetModulesPlugin.d.ts +10 -0
- package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +10 -0
- package/dist/builtin-plugin/BannerPlugin.d.ts +40 -0
- package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +15 -0
- package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +10 -0
- package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +10 -0
- package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +10 -0
- package/dist/builtin-plugin/CopyRspackPlugin.d.ts +15 -0
- package/dist/builtin-plugin/CssModulesPlugin.d.ts +10 -0
- package/dist/builtin-plugin/DataUriPlugin.d.ts +10 -0
- package/dist/builtin-plugin/DefinePlugin.d.ts +17 -0
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +10 -0
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +8 -0
- package/dist/builtin-plugin/DllEntryPlugin.d.ts +13 -0
- package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +11 -0
- package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +12 -0
- package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +10 -0
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +10 -0
- package/dist/builtin-plugin/EnableLibraryPlugin.d.ts +11 -0
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +10 -0
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +10 -0
- package/dist/builtin-plugin/EntryPlugin.d.ts +27 -0
- package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +11 -0
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +10 -0
- package/dist/builtin-plugin/ExternalsPlugin.d.ts +10 -0
- package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +10 -0
- package/dist/builtin-plugin/FileUriPlugin.d.ts +10 -0
- package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +10 -0
- package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +10 -0
- package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +10 -0
- package/dist/builtin-plugin/HotModuleReplacementPlugin.d.ts +7 -0
- package/dist/builtin-plugin/HtmlRspackPlugin.d.ts +112 -0
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +10 -0
- package/dist/builtin-plugin/IgnorePlugin.d.ts +19 -0
- package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +10 -0
- package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +15 -0
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +11 -0
- package/dist/builtin-plugin/JsonModulesPlugin.d.ts +10 -0
- package/dist/builtin-plugin/LibManifestPlugin.d.ts +18 -0
- package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +33 -0
- package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +15 -0
- package/dist/builtin-plugin/MangleExportsPlugin.d.ts +10 -0
- package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +10 -0
- package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +10 -0
- package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +8 -0
- package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +10 -0
- package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +10 -0
- package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +10 -0
- package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +8 -0
- package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +10 -0
- package/dist/builtin-plugin/NodeTargetPlugin.d.ts +10 -0
- package/dist/builtin-plugin/ProgressPlugin.d.ts +11 -0
- package/dist/builtin-plugin/ProvidePlugin.d.ts +11 -0
- package/dist/builtin-plugin/RealContentHashPlugin.d.ts +10 -0
- package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +10 -0
- package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +10 -0
- package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +11 -0
- package/dist/builtin-plugin/RuntimePlugin.d.ts +10 -0
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +10 -0
- package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +20 -0
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +11 -0
- package/dist/builtin-plugin/SplitChunksPlugin.d.ts +11 -0
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +213 -0
- package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +10 -0
- package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +7 -0
- package/dist/builtin-plugin/WorkerPlugin.d.ts +13 -0
- package/dist/builtin-plugin/base.d.ts +22 -0
- package/dist/builtin-plugin/css-extract/index.d.ts +23 -0
- package/dist/builtin-plugin/css-extract/loader.d.ts +21 -0
- package/dist/builtin-plugin/css-extract/utils.d.ts +6 -0
- package/dist/builtin-plugin/index.d.ts +71 -0
- package/dist/builtin-plugin/lazy-compilation/backend.d.ts +46 -0
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +24 -0
- package/dist/builtin-plugin/lazy-compilation/plugin.d.ts +13 -0
- package/dist/config/adapter.d.ts +10 -0
- package/dist/config/adapterRuleUse.d.ts +157 -0
- package/dist/config/browserslistTargetHandler.d.ts +21 -0
- package/dist/config/defaults.d.ts +12 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/normalization.d.ts +128 -0
- package/dist/config/target.d.ts +89 -0
- package/dist/config/types.d.ts +2136 -0
- package/dist/config/utils.d.ts +16 -0
- package/dist/config/zod.d.ts +4090 -0
- package/dist/container/ContainerPlugin.d.ts +40 -0
- package/dist/container/ContainerReferencePlugin.d.ts +33 -0
- package/dist/container/ModuleFederationPlugin.d.ts +13 -0
- package/dist/container/ModuleFederationPluginV1.d.ts +22 -0
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +10 -0
- package/dist/container/options.d.ts +3 -0
- package/dist/cssExtractHmr.js +224 -0
- package/dist/cssExtractLoader.js +278 -0
- package/dist/error/ConcurrentCompilationError.d.ts +14 -0
- package/dist/exports.d.ts +167 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +20251 -0
- package/dist/lib/AbstractMethodError.d.ts +24 -0
- package/dist/lib/Cache.d.ts +65 -0
- package/dist/lib/CacheFacade.d.ts +167 -0
- package/dist/lib/DllPlugin.d.ts +42 -0
- package/dist/lib/DllReferencePlugin.d.ts +119 -0
- package/dist/lib/EntryOptionPlugin.d.ts +33 -0
- package/dist/lib/EnvironmentPlugin.d.ts +22 -0
- package/dist/lib/HookWebpackError.d.ts +40 -0
- package/dist/lib/IgnoreWarningsPlugin.d.ts +25 -0
- package/dist/lib/LoaderOptionsPlugin.d.ts +28 -0
- package/dist/lib/LoaderTargetPlugin.d.ts +24 -0
- package/dist/lib/ModuleFilenameHelpers.d.ts +53 -0
- package/dist/lib/NormalModuleReplacementPlugin.d.ts +29 -0
- package/dist/lib/WebpackError.d.ts +23 -0
- package/dist/lib/cache/MemoryCachePlugin.d.ts +5 -0
- package/dist/lib/cache/getLazyHashedEtag.d.ts +35 -0
- package/dist/lib/cache/mergeEtags.d.ts +17 -0
- package/dist/loader-runner/LoaderLoadingError.d.ts +13 -0
- package/dist/loader-runner/index.d.ts +40 -0
- package/dist/loader-runner/loadLoader.d.ts +11 -0
- package/dist/logging/Logger.d.ts +61 -0
- package/dist/logging/createConsoleLogger.d.ts +35 -0
- package/dist/logging/truncateArgs.d.ts +16 -0
- package/dist/moduleFederationDefaultRuntime.js +1 -0
- package/dist/node/NodeEnvironmentPlugin.d.ts +10 -0
- package/dist/node/NodeTemplatePlugin.d.ts +18 -0
- package/dist/node/NodeWatchFileSystem.d.ts +18 -0
- package/dist/node/nodeConsole.d.ts +15 -0
- package/dist/rspack.d.ts +16 -0
- package/dist/rspackOptionsApply.d.ts +4 -0
- package/dist/runtime/cssExtractHmr.d.ts +4 -0
- package/dist/runtime/moduleFederationDefaultRuntime.d.ts +2 -0
- package/dist/sharing/ConsumeSharedPlugin.d.ts +41 -0
- package/dist/sharing/ProvideSharedPlugin.d.ts +34 -0
- package/dist/sharing/SharePlugin.d.ts +51 -0
- package/dist/sharing/ShareRuntimePlugin.d.ts +9 -0
- package/dist/sharing/utils.d.ts +1 -0
- package/dist/stats/DefaultStatsFactoryPlugin.d.ts +4 -0
- package/dist/stats/DefaultStatsPresetPlugin.d.ts +4 -0
- package/dist/stats/DefaultStatsPrinterPlugin.d.ts +13 -0
- package/dist/stats/StatsFactory.d.ts +57 -0
- package/dist/stats/StatsPrinter.d.ts +57 -0
- package/dist/stats/statsFactoryUtils.d.ts +295 -0
- package/dist/util/ArrayQueue.d.ts +45 -0
- package/dist/util/AssetInfo.d.ts +7 -0
- package/dist/util/MergeCaller.d.ts +9 -0
- package/dist/util/SizeFormatHelpers.d.ts +10 -0
- package/dist/util/SplitChunkSize.d.ts +5 -0
- package/dist/util/assertNotNil.d.ts +1 -0
- package/dist/util/assetCondition.d.ts +2 -0
- package/dist/util/asyncLib.d.ts +54 -0
- package/dist/util/bindingVersionCheck.d.ts +5 -0
- package/dist/util/cleverMerge.d.ts +54 -0
- package/dist/util/comparators.d.ts +20 -0
- package/dist/util/createHash.d.ts +16 -0
- package/dist/util/createReadonlyMap.d.ts +1 -0
- package/dist/util/fake.d.ts +9 -0
- package/dist/util/fs.d.ts +342 -0
- package/dist/util/hash/BatchedHash.d.ts +29 -0
- package/dist/util/hash/index.d.ts +17 -0
- package/dist/util/hash/md4.d.ts +11 -0
- package/dist/util/hash/wasm-hash.d.ts +52 -0
- package/dist/util/hash/xxhash64.d.ts +11 -0
- package/dist/util/identifier.d.ts +79 -0
- package/dist/util/index.d.ts +19 -0
- package/dist/util/memoize.d.ts +3 -0
- package/dist/util/smartGrouping.d.ts +21 -0
- package/dist/util/source.d.ts +7 -0
- package/dist/util/validate.d.ts +6 -0
- package/hot/dev-server.js +75 -0
- package/hot/emitter.js +21 -0
- package/hot/lazy-compilation-node.js +50 -0
- package/hot/lazy-compilation-web.js +83 -0
- package/hot/log-apply-result.js +49 -0
- package/hot/log.js +79 -0
- package/hot/only-dev-server.js +103 -0
- package/hot/poll.js +40 -0
- package/hot/signal.js +66 -0
- package/module.d.ts +244 -0
- package/package.json +55 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
import type { Compiler } from "../Compiler";
|
|
3
|
+
export declare const JsLoaderRspackPlugin: {
|
|
4
|
+
new (compiler: Compiler): {
|
|
5
|
+
name: BuiltinPluginName;
|
|
6
|
+
_args: [compiler: Compiler];
|
|
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
|
+
raw(compiler: Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
9
|
+
apply(compiler: Compiler): void;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
export declare const JsonModulesPlugin: {
|
|
3
|
+
new (): {
|
|
4
|
+
name: BuiltinPluginName;
|
|
5
|
+
_args: [];
|
|
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
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("..").Compiler): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
export type LibManifestPluginOptions = {
|
|
3
|
+
context?: string;
|
|
4
|
+
entryOnly?: boolean;
|
|
5
|
+
format?: boolean;
|
|
6
|
+
name?: string;
|
|
7
|
+
path: string;
|
|
8
|
+
type?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const LibManifestPlugin: {
|
|
11
|
+
new (options: LibManifestPluginOptions): {
|
|
12
|
+
name: BuiltinPluginName;
|
|
13
|
+
_args: [options: LibManifestPluginOptions];
|
|
14
|
+
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;
|
|
15
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
16
|
+
apply(compiler: import("..").Compiler): void;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
import { type Drafts, type FeatureOptions, type NonStandard, type PseudoClasses } from "../builtin-loader/lightningcss";
|
|
3
|
+
import type { AssetConditions } from "../util/assetCondition";
|
|
4
|
+
export type LightningCssMinimizerRspackPluginOptions = {
|
|
5
|
+
test?: AssetConditions;
|
|
6
|
+
include?: AssetConditions;
|
|
7
|
+
exclude?: AssetConditions;
|
|
8
|
+
removeUnusedLocalIdents?: boolean;
|
|
9
|
+
minimizerOptions?: {
|
|
10
|
+
errorRecovery?: boolean;
|
|
11
|
+
targets?: string[] | string;
|
|
12
|
+
include?: FeatureOptions;
|
|
13
|
+
exclude?: FeatureOptions;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Use `drafts` instead.
|
|
16
|
+
* This will be removed in the next major version.
|
|
17
|
+
*/
|
|
18
|
+
draft?: Drafts;
|
|
19
|
+
drafts?: Drafts;
|
|
20
|
+
nonStandard?: NonStandard;
|
|
21
|
+
pseudoClasses?: PseudoClasses;
|
|
22
|
+
unusedSymbols?: string[];
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare const LightningCssMinimizerRspackPlugin: {
|
|
26
|
+
new (options?: LightningCssMinimizerRspackPluginOptions | undefined): {
|
|
27
|
+
name: BuiltinPluginName;
|
|
28
|
+
_args: [options?: LightningCssMinimizerRspackPluginOptions | undefined];
|
|
29
|
+
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;
|
|
30
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
31
|
+
apply(compiler: import("..").Compiler): void;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
export type LimitChunkCountOptions = {
|
|
3
|
+
chunkOverhead?: number;
|
|
4
|
+
entryChunkMultiplicator?: number;
|
|
5
|
+
maxChunks: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const LimitChunkCountPlugin: {
|
|
8
|
+
new (options: LimitChunkCountOptions): {
|
|
9
|
+
name: BuiltinPluginName;
|
|
10
|
+
_args: [options: LimitChunkCountOptions];
|
|
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
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
13
|
+
apply(compiler: import("..").Compiler): void;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
import type { Compiler } from "../Compiler";
|
|
3
|
+
import { RspackBuiltinPlugin } from "./base";
|
|
4
|
+
export declare class MangleExportsPlugin extends RspackBuiltinPlugin {
|
|
5
|
+
private deterministic;
|
|
6
|
+
name: BuiltinPluginName;
|
|
7
|
+
affectedHooks: "compilation";
|
|
8
|
+
constructor(deterministic: boolean);
|
|
9
|
+
raw(compiler: Compiler): BuiltinPlugin;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
export declare const MergeDuplicateChunksPlugin: {
|
|
3
|
+
new (): {
|
|
4
|
+
name: BuiltinPluginName;
|
|
5
|
+
_args: [];
|
|
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
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("..").Compiler): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
export declare const ModuleChunkFormatPlugin: {
|
|
3
|
+
new (): {
|
|
4
|
+
name: BuiltinPluginName;
|
|
5
|
+
_args: [];
|
|
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
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("..").Compiler): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
import type { Compiler } from "../Compiler";
|
|
3
|
+
import { RspackBuiltinPlugin } from "./base";
|
|
4
|
+
export declare class ModuleConcatenationPlugin extends RspackBuiltinPlugin {
|
|
5
|
+
name: BuiltinPluginName;
|
|
6
|
+
affectedHooks: "compilation";
|
|
7
|
+
raw(compiler: Compiler): BuiltinPlugin;
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
export declare const NamedChunkIdsPlugin: {
|
|
3
|
+
new (): {
|
|
4
|
+
name: BuiltinPluginName;
|
|
5
|
+
_args: [];
|
|
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
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("..").Compiler): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
export declare const NamedModuleIdsPlugin: {
|
|
3
|
+
new (): {
|
|
4
|
+
name: BuiltinPluginName;
|
|
5
|
+
_args: [];
|
|
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
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("..").Compiler): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
export declare const NaturalChunkIdsPlugin: {
|
|
3
|
+
new (): {
|
|
4
|
+
name: BuiltinPluginName;
|
|
5
|
+
_args: [];
|
|
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
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("..").Compiler): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
import type { Compiler } from "../Compiler";
|
|
3
|
+
import { RspackBuiltinPlugin } from "./base";
|
|
4
|
+
export declare class NaturalModuleIdsPlugin extends RspackBuiltinPlugin {
|
|
5
|
+
name: BuiltinPluginName;
|
|
6
|
+
affectedHooks: "compilation";
|
|
7
|
+
raw(compiler: Compiler): BuiltinPlugin;
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
export declare const NoEmitOnErrorsPlugin: {
|
|
3
|
+
new (): {
|
|
4
|
+
name: BuiltinPluginName;
|
|
5
|
+
_args: [];
|
|
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
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("..").Compiler): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
export declare const NodeTargetPlugin: {
|
|
3
|
+
new (): {
|
|
4
|
+
name: BuiltinPluginName;
|
|
5
|
+
_args: [];
|
|
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
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("..").Compiler): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BuiltinPluginName, type RawProgressPluginOptions } from "@rspack/binding";
|
|
2
|
+
export type ProgressPluginArgument = Partial<Omit<RawProgressPluginOptions, "handler">> | ((percentage: number, msg: string, ...args: string[]) => void) | undefined;
|
|
3
|
+
export declare const ProgressPlugin: {
|
|
4
|
+
new (progress?: ProgressPluginArgument): {
|
|
5
|
+
name: BuiltinPluginName;
|
|
6
|
+
_args: [progress?: ProgressPluginArgument];
|
|
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
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
9
|
+
apply(compiler: import("..").Compiler): void;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
export type ProvidePluginOptions = Record<string, string | string[]>;
|
|
3
|
+
export declare const ProvidePlugin: {
|
|
4
|
+
new (provide: ProvidePluginOptions): {
|
|
5
|
+
name: BuiltinPluginName;
|
|
6
|
+
_args: [provide: ProvidePluginOptions];
|
|
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
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
9
|
+
apply(compiler: import("..").Compiler): void;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
export declare const RealContentHashPlugin: {
|
|
3
|
+
new (): {
|
|
4
|
+
name: BuiltinPluginName;
|
|
5
|
+
_args: [];
|
|
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
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("..").Compiler): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
export declare const RemoveDuplicateModulesPlugin: {
|
|
3
|
+
new (): {
|
|
4
|
+
name: BuiltinPluginName;
|
|
5
|
+
_args: [];
|
|
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
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("..").Compiler): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
export declare const RemoveEmptyChunksPlugin: {
|
|
3
|
+
new (): {
|
|
4
|
+
name: BuiltinPluginName;
|
|
5
|
+
_args: [];
|
|
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
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("..").Compiler): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BuiltinPluginName, type RawRuntimeChunkOptions } from "@rspack/binding";
|
|
2
|
+
export type RuntimeChunkPluginOptions = RawRuntimeChunkOptions;
|
|
3
|
+
export declare const RuntimeChunkPlugin: {
|
|
4
|
+
new (options: RawRuntimeChunkOptions): {
|
|
5
|
+
name: BuiltinPluginName;
|
|
6
|
+
_args: [options: RawRuntimeChunkOptions];
|
|
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
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
9
|
+
apply(compiler: import("..").Compiler): void;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
export declare const RuntimePlugin: {
|
|
3
|
+
new (): {
|
|
4
|
+
name: BuiltinPluginName;
|
|
5
|
+
_args: [];
|
|
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
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("..").Compiler): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
export declare const SideEffectsFlagPlugin: {
|
|
3
|
+
new (): {
|
|
4
|
+
name: BuiltinPluginName;
|
|
5
|
+
_args: [];
|
|
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
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("..").Compiler): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
export declare const SizeLimitsPlugin: {
|
|
3
|
+
new (options: {
|
|
4
|
+
assetFilter?: (assetFilename: string) => boolean;
|
|
5
|
+
hints?: false | "warning" | "error";
|
|
6
|
+
maxAssetSize?: number;
|
|
7
|
+
maxEntrypointSize?: number;
|
|
8
|
+
}): {
|
|
9
|
+
name: BuiltinPluginName;
|
|
10
|
+
_args: [options: {
|
|
11
|
+
assetFilter?: (assetFilename: string) => boolean;
|
|
12
|
+
hints?: false | "warning" | "error";
|
|
13
|
+
maxAssetSize?: number;
|
|
14
|
+
maxEntrypointSize?: number;
|
|
15
|
+
}];
|
|
16
|
+
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;
|
|
17
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
18
|
+
apply(compiler: import("..").Compiler): void;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BuiltinPluginName, type RawSourceMapDevToolPluginOptions } from "@rspack/binding";
|
|
2
|
+
export type { RawSourceMapDevToolPluginOptions as SourceMapDevToolPluginOptions };
|
|
3
|
+
export declare const SourceMapDevToolPlugin: {
|
|
4
|
+
new (options: RawSourceMapDevToolPluginOptions): {
|
|
5
|
+
name: BuiltinPluginName;
|
|
6
|
+
_args: [options: RawSourceMapDevToolPluginOptions];
|
|
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
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
9
|
+
apply(compiler: import("..").Compiler): void;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
import type { Compiler } from "../Compiler";
|
|
3
|
+
import type { OptimizationSplitChunksOptions } from "../config";
|
|
4
|
+
import { RspackBuiltinPlugin } from "./base";
|
|
5
|
+
export declare class SplitChunksPlugin extends RspackBuiltinPlugin {
|
|
6
|
+
private options;
|
|
7
|
+
name: BuiltinPluginName;
|
|
8
|
+
affectedHooks: "thisCompilation";
|
|
9
|
+
constructor(options: OptimizationSplitChunksOptions);
|
|
10
|
+
raw(compiler: Compiler): BuiltinPlugin;
|
|
11
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
import type { AssetConditions } from "../util/assetCondition";
|
|
3
|
+
type ExtractCommentsCondition = boolean | RegExp;
|
|
4
|
+
type ExtractCommentsBanner = string | boolean;
|
|
5
|
+
type ExtractCommentsObject = {
|
|
6
|
+
condition?: ExtractCommentsCondition | undefined;
|
|
7
|
+
banner?: ExtractCommentsBanner | undefined;
|
|
8
|
+
};
|
|
9
|
+
type ExtractCommentsOptions = ExtractCommentsCondition | ExtractCommentsObject;
|
|
10
|
+
export type SwcJsMinimizerRspackPluginOptions = {
|
|
11
|
+
test?: AssetConditions;
|
|
12
|
+
exclude?: AssetConditions;
|
|
13
|
+
include?: AssetConditions;
|
|
14
|
+
extractComments?: ExtractCommentsOptions | undefined;
|
|
15
|
+
minimizerOptions?: {
|
|
16
|
+
minify?: boolean;
|
|
17
|
+
compress?: TerserCompressOptions | boolean;
|
|
18
|
+
mangle?: TerserMangleOptions | boolean;
|
|
19
|
+
format?: JsFormatOptions & ToSnakeCaseProperties<JsFormatOptions>;
|
|
20
|
+
module?: boolean;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* @example ToSnakeCase<'indentLevel'> == 'indent_level'
|
|
25
|
+
*/
|
|
26
|
+
type ToSnakeCase<T extends string> = T extends `${infer A}${infer B}` ? `${A extends Lowercase<A> ? A : `_${Lowercase<A>}`}${ToSnakeCase<B>}` : T;
|
|
27
|
+
/**
|
|
28
|
+
* @example ToSnakeCaseProperties\<{indentLevel: 3\}\> == {indent_level: 3\}
|
|
29
|
+
*/
|
|
30
|
+
type ToSnakeCaseProperties<T> = {
|
|
31
|
+
[K in keyof T as K extends string ? ToSnakeCase<K> : K]: T[K];
|
|
32
|
+
};
|
|
33
|
+
export interface JsFormatOptions {
|
|
34
|
+
/**
|
|
35
|
+
* Currently noop.
|
|
36
|
+
* @default false
|
|
37
|
+
* @alias ascii_only
|
|
38
|
+
*/
|
|
39
|
+
asciiOnly?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Currently noop.
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
44
|
+
beautify?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Currently noop.
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
49
|
+
braces?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* - `false`: removes all comments
|
|
52
|
+
* - `'some'`: preserves some comments
|
|
53
|
+
* - `'all'`: preserves all comments
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
56
|
+
comments?: false | "some" | "all";
|
|
57
|
+
/**
|
|
58
|
+
* Currently noop.
|
|
59
|
+
* @default 5
|
|
60
|
+
*/
|
|
61
|
+
ecma?: TerserEcmaVersion;
|
|
62
|
+
/**
|
|
63
|
+
* Currently noop.
|
|
64
|
+
* @alias indent_level
|
|
65
|
+
*/
|
|
66
|
+
indentLevel?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Currently noop.
|
|
69
|
+
* @alias indent_start
|
|
70
|
+
*/
|
|
71
|
+
indentStart?: number;
|
|
72
|
+
inlineScript?: number;
|
|
73
|
+
/**
|
|
74
|
+
* Currently noop.
|
|
75
|
+
* @alias keep_numbers
|
|
76
|
+
*/
|
|
77
|
+
keepNumbers?: number;
|
|
78
|
+
/**
|
|
79
|
+
* Currently noop.
|
|
80
|
+
* @alias keep_quoted_props
|
|
81
|
+
*/
|
|
82
|
+
keepQuotedProps?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Currently noop.
|
|
85
|
+
* @alias max_line_len
|
|
86
|
+
*/
|
|
87
|
+
maxLineLen?: number | false;
|
|
88
|
+
/**
|
|
89
|
+
* Currently noop.
|
|
90
|
+
*/
|
|
91
|
+
preamble?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Currently noop.
|
|
94
|
+
* @alias quote_keys
|
|
95
|
+
*/
|
|
96
|
+
quoteKeys?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Currently noop.
|
|
99
|
+
* @alias quote_style
|
|
100
|
+
*/
|
|
101
|
+
quoteStyle?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Currently noop.
|
|
104
|
+
* @alias preserve_annotations
|
|
105
|
+
*/
|
|
106
|
+
preserveAnnotations?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Currently noop.
|
|
109
|
+
*/
|
|
110
|
+
safari10?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Currently noop.
|
|
113
|
+
*/
|
|
114
|
+
semicolons?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Currently noop.
|
|
117
|
+
*/
|
|
118
|
+
shebang?: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Currently noop.
|
|
121
|
+
*/
|
|
122
|
+
webkit?: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Currently noop.
|
|
125
|
+
* @alias wrap_iife
|
|
126
|
+
*/
|
|
127
|
+
wrapIife?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Currently noop.
|
|
130
|
+
* @alias wrap_func_args
|
|
131
|
+
*/
|
|
132
|
+
wrapFuncArgs?: boolean;
|
|
133
|
+
}
|
|
134
|
+
export type TerserEcmaVersion = 5 | 2015 | 2016 | string | number;
|
|
135
|
+
export interface TerserCompressOptions {
|
|
136
|
+
arguments?: boolean;
|
|
137
|
+
arrows?: boolean;
|
|
138
|
+
booleans?: boolean;
|
|
139
|
+
booleans_as_integers?: boolean;
|
|
140
|
+
collapse_vars?: boolean;
|
|
141
|
+
comparisons?: boolean;
|
|
142
|
+
computed_props?: boolean;
|
|
143
|
+
conditionals?: boolean;
|
|
144
|
+
dead_code?: boolean;
|
|
145
|
+
defaults?: boolean;
|
|
146
|
+
directives?: boolean;
|
|
147
|
+
drop_console?: boolean;
|
|
148
|
+
drop_debugger?: boolean;
|
|
149
|
+
ecma?: TerserEcmaVersion;
|
|
150
|
+
evaluate?: boolean;
|
|
151
|
+
expression?: boolean;
|
|
152
|
+
global_defs?: any;
|
|
153
|
+
hoist_funs?: boolean;
|
|
154
|
+
hoist_props?: boolean;
|
|
155
|
+
hoist_vars?: boolean;
|
|
156
|
+
ie8?: boolean;
|
|
157
|
+
if_return?: boolean;
|
|
158
|
+
inline?: 0 | 1 | 2 | 3;
|
|
159
|
+
join_vars?: boolean;
|
|
160
|
+
keep_classnames?: boolean;
|
|
161
|
+
keep_fargs?: boolean;
|
|
162
|
+
keep_fnames?: boolean;
|
|
163
|
+
keep_infinity?: boolean;
|
|
164
|
+
loops?: boolean;
|
|
165
|
+
negate_iife?: boolean;
|
|
166
|
+
passes?: number;
|
|
167
|
+
properties?: boolean;
|
|
168
|
+
pure_getters?: any;
|
|
169
|
+
pure_funcs?: string[];
|
|
170
|
+
reduce_funcs?: boolean;
|
|
171
|
+
reduce_vars?: boolean;
|
|
172
|
+
sequences?: any;
|
|
173
|
+
side_effects?: boolean;
|
|
174
|
+
switches?: boolean;
|
|
175
|
+
top_retain?: any;
|
|
176
|
+
toplevel?: any;
|
|
177
|
+
typeofs?: boolean;
|
|
178
|
+
unsafe?: boolean;
|
|
179
|
+
unsafe_passes?: boolean;
|
|
180
|
+
unsafe_arrows?: boolean;
|
|
181
|
+
unsafe_comps?: boolean;
|
|
182
|
+
unsafe_function?: boolean;
|
|
183
|
+
unsafe_math?: boolean;
|
|
184
|
+
unsafe_symbols?: boolean;
|
|
185
|
+
unsafe_methods?: boolean;
|
|
186
|
+
unsafe_proto?: boolean;
|
|
187
|
+
unsafe_regexp?: boolean;
|
|
188
|
+
unsafe_undefined?: boolean;
|
|
189
|
+
unused?: boolean;
|
|
190
|
+
const_to_let?: boolean;
|
|
191
|
+
module?: boolean;
|
|
192
|
+
}
|
|
193
|
+
export interface TerserMangleOptions {
|
|
194
|
+
props?: TerserManglePropertiesOptions;
|
|
195
|
+
toplevel?: boolean;
|
|
196
|
+
keep_classnames?: boolean;
|
|
197
|
+
keep_fnames?: boolean;
|
|
198
|
+
keep_private_props?: boolean;
|
|
199
|
+
ie8?: boolean;
|
|
200
|
+
safari10?: boolean;
|
|
201
|
+
reserved?: string[];
|
|
202
|
+
}
|
|
203
|
+
export type TerserManglePropertiesOptions = {};
|
|
204
|
+
export declare const SwcJsMinimizerRspackPlugin: {
|
|
205
|
+
new (options?: SwcJsMinimizerRspackPluginOptions | undefined): {
|
|
206
|
+
name: BuiltinPluginName;
|
|
207
|
+
_args: [options?: SwcJsMinimizerRspackPluginOptions | undefined];
|
|
208
|
+
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;
|
|
209
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
210
|
+
apply(compiler: import("..").Compiler): void;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
export declare const WarnCaseSensitiveModulesPlugin: {
|
|
3
|
+
new (): {
|
|
4
|
+
name: BuiltinPluginName;
|
|
5
|
+
_args: [];
|
|
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
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("..").Compiler): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
import type { Compiler } from "../Compiler";
|
|
3
|
+
import { RspackBuiltinPlugin } from "./base";
|
|
4
|
+
export declare class WebWorkerTemplatePlugin extends RspackBuiltinPlugin {
|
|
5
|
+
name: BuiltinPluginName;
|
|
6
|
+
raw(compiler: Compiler): BuiltinPlugin | undefined;
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
import type { Compiler } from "../Compiler";
|
|
3
|
+
import type { ChunkLoading, OutputModule, WasmLoading, WorkerPublicPath } from "../config";
|
|
4
|
+
import { RspackBuiltinPlugin } from "./base";
|
|
5
|
+
export declare class WorkerPlugin extends RspackBuiltinPlugin {
|
|
6
|
+
private chunkLoading;
|
|
7
|
+
private wasmLoading;
|
|
8
|
+
private module;
|
|
9
|
+
private workerPublicPath;
|
|
10
|
+
name: BuiltinPluginName;
|
|
11
|
+
constructor(chunkLoading: ChunkLoading, wasmLoading: WasmLoading, module: OutputModule, workerPublicPath: WorkerPublicPath);
|
|
12
|
+
raw(compiler: Compiler): BuiltinPlugin;
|
|
13
|
+
}
|