@rspack-canary/core 1.7.3-canary-0b48f4eb-20260120024403 → 1.7.4-canary-e31ee70c-20260121175734
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChunkGraph.d.ts +1 -1
- package/dist/Compilation.d.ts +27 -27
- package/dist/Compiler.d.ts +17 -18
- package/dist/ContextModuleFactory.d.ts +1 -1
- package/dist/Diagnostics.d.ts +1 -1
- package/dist/ExecuteModulePlugin.d.ts +1 -1
- package/dist/ExportsInfo.d.ts +1 -1
- package/dist/FileSystem.d.ts +1 -1
- package/dist/Module.d.ts +2 -2
- package/dist/ModuleGraph.d.ts +2 -2
- package/dist/MultiCompiler.d.ts +7 -7
- package/dist/MultiStats.d.ts +3 -3
- package/dist/MultiWatching.d.ts +2 -2
- package/dist/NativeWatchFileSystem.d.ts +1 -1
- package/dist/NormalModule.d.ts +3 -3
- package/dist/NormalModuleFactory.d.ts +3 -3
- package/dist/Resolver.d.ts +1 -1
- package/dist/ResolverFactory.d.ts +2 -2
- package/dist/RuntimeGlobals.d.ts +1 -1
- package/dist/RuntimeModule.d.ts +3 -3
- package/dist/Stats.d.ts +4 -4
- package/dist/VirtualModulesPlugin.d.ts +1 -1
- package/dist/Watching.d.ts +4 -4
- package/dist/builtin-loader/index.d.ts +1 -1
- package/dist/builtin-loader/lightningcss/index.d.ts +5 -0
- package/dist/builtin-loader/swc/index.d.ts +5 -5
- package/dist/builtin-loader/swc/types.d.ts +6 -4
- package/dist/builtin-plugin/APIPlugin.d.ts +3 -3
- package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +3 -3
- package/dist/builtin-plugin/AssetModulesPlugin.d.ts +3 -3
- package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +3 -3
- package/dist/builtin-plugin/BannerPlugin.d.ts +3 -3
- package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +3 -3
- package/dist/builtin-plugin/CaseSensitivePlugin.d.ts +3 -3
- package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +3 -3
- package/dist/builtin-plugin/CircularDependencyRspackPlugin.d.ts +4 -4
- package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +3 -3
- package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +3 -3
- package/dist/builtin-plugin/CopyRspackPlugin.d.ts +3 -3
- package/dist/builtin-plugin/CssChunkingPlugin.d.ts +3 -3
- package/dist/builtin-plugin/CssModulesPlugin.d.ts +3 -3
- package/dist/builtin-plugin/DataUriPlugin.d.ts +3 -3
- package/dist/builtin-plugin/DefinePlugin.d.ts +3 -3
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DllEntryPlugin.d.ts +3 -3
- package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +3 -3
- package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +3 -3
- package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +3 -3
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +2 -2
- package/dist/builtin-plugin/EnableLibraryPlugin.d.ts +2 -2
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +3 -3
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +3 -3
- package/dist/builtin-plugin/EntryPlugin.d.ts +4 -4
- package/dist/builtin-plugin/EsmLibraryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +3 -3
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +3 -3
- package/dist/builtin-plugin/ExternalsPlugin.d.ts +2 -2
- package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +3 -3
- package/dist/builtin-plugin/FileUriPlugin.d.ts +3 -3
- package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +3 -3
- package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +3 -3
- package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -1
- package/dist/builtin-plugin/HotModuleReplacementPlugin.d.ts +2 -2
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +3 -3
- package/dist/builtin-plugin/HttpUriPlugin.d.ts +2 -2
- package/dist/builtin-plugin/IgnorePlugin.d.ts +3 -3
- package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +3 -3
- package/dist/builtin-plugin/InlineExportsPlugin.d.ts +3 -3
- package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +4 -4
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +2 -2
- package/dist/builtin-plugin/JsonModulesPlugin.d.ts +3 -3
- package/dist/builtin-plugin/LibManifestPlugin.d.ts +3 -3
- package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +10 -5
- package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +3 -3
- package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +3 -3
- package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +3 -3
- package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleInfoHeaderPlugin.d.ts +3 -3
- package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +3 -3
- package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +3 -3
- package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +3 -3
- package/dist/builtin-plugin/NodeTargetPlugin.d.ts +3 -3
- package/dist/builtin-plugin/NormalModuleReplacementPlugin.d.ts +4 -4
- package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +3 -3
- package/dist/builtin-plugin/ProgressPlugin.d.ts +3 -3
- package/dist/builtin-plugin/ProvidePlugin.d.ts +3 -3
- package/dist/builtin-plugin/RealContentHashPlugin.d.ts +3 -3
- package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +3 -3
- package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +3 -3
- package/dist/builtin-plugin/RsdoctorPlugin.d.ts +8 -4
- package/dist/builtin-plugin/RslibPlugin.d.ts +3 -3
- package/dist/builtin-plugin/RstestPlugin.d.ts +3 -3
- package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +3 -3
- package/dist/builtin-plugin/RuntimePlugin.d.ts +10 -6
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +3 -3
- package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +3 -3
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +3 -3
- package/dist/builtin-plugin/SplitChunksPlugin.d.ts +3 -3
- package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +2 -2
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +5 -5
- package/dist/builtin-plugin/URLPlugin.d.ts +3 -3
- package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +2 -2
- package/dist/builtin-plugin/WorkerPlugin.d.ts +3 -3
- package/dist/builtin-plugin/base.d.ts +3 -3
- package/dist/builtin-plugin/css-extract/index.d.ts +3 -3
- package/dist/builtin-plugin/css-extract/loader.d.ts +1 -1
- package/dist/builtin-plugin/css-extract/utils.d.ts +1 -1
- package/dist/builtin-plugin/html-plugin/hooks.d.ts +2 -2
- package/dist/builtin-plugin/html-plugin/index.d.ts +2 -2
- package/dist/builtin-plugin/html-plugin/options.d.ts +6 -1
- package/dist/builtin-plugin/html-plugin/plugin.d.ts +9 -5
- package/dist/builtin-plugin/html-plugin/taps.d.ts +1 -1
- package/dist/builtin-plugin/index.d.ts +84 -85
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +4 -4
- package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +2 -2
- package/dist/config/adapter.d.ts +4 -4
- package/dist/config/adapterRuleUse.d.ts +9 -9
- package/dist/config/browserslistTargetHandler.d.ts +1 -1
- package/dist/config/defaults.d.ts +1 -1
- package/dist/config/devServer.d.ts +3 -3
- package/dist/config/index.d.ts +5 -5
- package/dist/config/normalization.d.ts +35 -7
- package/dist/config/types.d.ts +156 -67
- package/dist/container/ContainerPlugin.d.ts +3 -3
- package/dist/container/ContainerReferencePlugin.d.ts +3 -3
- package/dist/container/ModuleFederationManifestPlugin.d.ts +2 -2
- package/dist/container/ModuleFederationPlugin.d.ts +5 -3
- package/dist/container/ModuleFederationPluginV1.d.ts +5 -5
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +7 -3
- package/dist/container/index.d.ts +4 -4
- package/dist/cssExtractHmr.js +27 -2
- package/dist/cssExtractLoader.js +57 -15
- package/dist/exports.d.ts +81 -70
- package/dist/index.d.ts +3 -3
- package/dist/index.js +11731 -11457
- package/dist/lib/AbstractMethodError.d.ts +1 -1
- package/dist/lib/Cache.d.ts +1 -1
- package/dist/lib/CacheFacade.d.ts +3 -3
- package/dist/lib/DllPlugin.d.ts +2 -2
- package/dist/lib/DllReferencePlugin.d.ts +3 -3
- package/dist/lib/EntryOptionPlugin.d.ts +2 -2
- package/dist/lib/EnvironmentPlugin.d.ts +1 -1
- package/dist/lib/HookWebpackError.d.ts +1 -1
- package/dist/lib/IgnoreWarningsPlugin.d.ts +1 -1
- package/dist/lib/LoaderOptionsPlugin.d.ts +2 -2
- package/dist/lib/LoaderTargetPlugin.d.ts +2 -2
- package/dist/lib/WebpackError.d.ts +2 -2
- package/dist/lib/cache/MemoryCachePlugin.d.ts +1 -1
- package/dist/lib/cache/getLazyHashedEtag.d.ts +1 -1
- package/dist/lib/cache/mergeEtags.d.ts +1 -1
- package/dist/loader-runner/ModuleError.d.ts +1 -1
- package/dist/loader-runner/index.d.ts +1 -1
- package/dist/loader-runner/loadLoader.d.ts +2 -2
- package/dist/loader-runner/utils.d.ts +3 -3
- package/dist/loader-runner/worker.d.ts +1 -1
- package/dist/logging/createConsoleLogger.d.ts +2 -2
- package/dist/moduleFederationDefaultRuntime.js +1 -1
- package/dist/node/NodeEnvironmentPlugin.d.ts +2 -2
- package/dist/node/NodeTemplatePlugin.d.ts +1 -1
- package/dist/node/NodeWatchFileSystem.d.ts +1 -1
- package/dist/node/nodeConsole.d.ts +1 -1
- package/dist/rspack.d.ts +5 -5
- package/dist/rspackOptionsApply.d.ts +1 -1
- package/dist/runtime/moduleFederationDefaultRuntime.d.ts +2 -1
- package/dist/sharing/ConsumeSharedPlugin.d.ts +2 -2
- package/dist/sharing/ProvideSharedPlugin.d.ts +2 -2
- package/dist/sharing/SharePlugin.d.ts +1 -1
- package/dist/sharing/ShareRuntimePlugin.d.ts +2 -2
- package/dist/stats/DefaultStatsFactoryPlugin.d.ts +1 -1
- package/dist/stats/DefaultStatsPresetPlugin.d.ts +1 -1
- package/dist/stats/DefaultStatsPrinterPlugin.d.ts +1 -1
- package/dist/stats/StatsFactory.d.ts +2 -2
- package/dist/stats/StatsPrinter.d.ts +1 -1
- package/dist/stats/statsFactoryUtils.d.ts +6 -3
- package/dist/taps/compilation.d.ts +1 -1
- package/dist/taps/compiler.d.ts +1 -1
- package/dist/taps/contextModuleFactory.d.ts +1 -1
- package/dist/taps/index.d.ts +6 -6
- package/dist/taps/javascriptModules.d.ts +1 -1
- package/dist/taps/normalModuleFactory.d.ts +1 -1
- package/dist/taps/types.d.ts +1 -1
- package/dist/trace/traceHookPlugin.d.ts +1 -1
- package/dist/util/createHash.d.ts +1 -1
- package/dist/util/fs.d.ts +1 -1
- package/dist/util/hash/md4.d.ts +1 -1
- package/dist/util/hash/xxhash64.d.ts +1 -1
- package/dist/util/index.d.ts +1 -1
- package/dist/util/validateConfig.d.ts +1 -1
- package/dist/worker.js +918 -846
- package/hot/dev-server.js +9 -12
- package/hot/emitter.js +1 -5
- package/hot/lazy-compilation-node.js +1 -4
- package/hot/lazy-compilation-web.js +3 -2
- package/hot/log-apply-result.js +5 -8
- package/hot/log.js +7 -17
- package/hot/only-dev-server.js +10 -13
- package/hot/poll.js +8 -11
- package/hot/signal.js +9 -13
- package/package.json +6 -9
- package/dist/builtin-plugin/rsc/Coordinator.d.ts +0 -8
- package/dist/builtin-plugin/rsc/RscClientPlugin.d.ts +0 -13
- package/dist/builtin-plugin/rsc/RscServerPlugin.d.ts +0 -14
- package/dist/builtin-plugin/rsc/index.d.ts +0 -24
- package/dist/rslib-runtime.js +0 -29
package/dist/config/adapter.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type RawOptions } from '@rspack/binding';
|
|
2
|
-
import type { Compiler } from '../Compiler
|
|
3
|
-
import { type LoaderContext, type LoaderDefinition, type LoaderDefinitionFunction, type PitchLoaderDefinitionFunction } from './adapterRuleUse
|
|
4
|
-
import type { RspackOptionsNormalized } from './normalization
|
|
5
|
-
import type { Resolve } from './types
|
|
2
|
+
import type { Compiler } from '../Compiler';
|
|
3
|
+
import { type LoaderContext, type LoaderDefinition, type LoaderDefinitionFunction, type PitchLoaderDefinitionFunction } from './adapterRuleUse';
|
|
4
|
+
import type { RspackOptionsNormalized } from './normalization';
|
|
5
|
+
import type { Resolve } from './types';
|
|
6
6
|
export type { LoaderContext, LoaderDefinition, LoaderDefinitionFunction, PitchLoaderDefinitionFunction, };
|
|
7
7
|
export declare const getRawOptions: (options: RspackOptionsNormalized, compiler: Compiler) => RawOptions;
|
|
8
8
|
export declare function getRawResolve(resolve: Resolve): RawOptions['resolve'];
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { AssetInfo, RawModuleRuleUse, RawOptions } from '@rspack/binding';
|
|
2
|
-
import type { Compilation } from '../Compilation
|
|
3
|
-
import type { Compiler } from '../Compiler
|
|
4
|
-
import { type LoaderObject } from '../loader-runner
|
|
5
|
-
import type { Logger } from '../logging/Logger
|
|
6
|
-
import type { Module } from '../Module
|
|
7
|
-
import type { ResolveRequest } from '../Resolver
|
|
8
|
-
import type Hash from '../util/hash
|
|
9
|
-
import type { RspackOptionsNormalized } from './normalization
|
|
10
|
-
import type { Mode, PublicPath, Resolve, RuleSetUseItem, Target } from './types
|
|
2
|
+
import type { Compilation } from '../Compilation';
|
|
3
|
+
import type { Compiler } from '../Compiler';
|
|
4
|
+
import { type LoaderObject } from '../loader-runner';
|
|
5
|
+
import type { Logger } from '../logging/Logger';
|
|
6
|
+
import type { Module } from '../Module';
|
|
7
|
+
import type { ResolveRequest } from '../Resolver';
|
|
8
|
+
import type Hash from '../util/hash';
|
|
9
|
+
import type { RspackOptionsNormalized } from './normalization';
|
|
10
|
+
import type { Mode, PublicPath, Resolve, RuleSetUseItem, Target } from './types';
|
|
11
11
|
export declare const BUILTIN_LOADER_PREFIX = "builtin:";
|
|
12
12
|
export interface ComposeJsUseOptions {
|
|
13
13
|
context: RawOptions['context'];
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Copyright (c) JS Foundation and other contributors
|
|
8
8
|
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
9
|
*/
|
|
10
|
-
import type { ApiTargetProperties, EcmaTargetProperties, PlatformTargetProperties } from './target
|
|
10
|
+
import type { ApiTargetProperties, EcmaTargetProperties, PlatformTargetProperties } from './target';
|
|
11
11
|
/**
|
|
12
12
|
* @param browsers supported browsers list
|
|
13
13
|
* @returns target properties
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RspackOptionsNormalized } from './normalization
|
|
1
|
+
import type { RspackOptionsNormalized } from './normalization';
|
|
2
2
|
export declare const applyRspackOptionsDefaults: (options: RspackOptionsNormalized) => {
|
|
3
3
|
platform: false | {
|
|
4
4
|
web: boolean | null | undefined;
|
|
@@ -11,7 +11,7 @@ import type * as http from 'node:http';
|
|
|
11
11
|
import type * as net from 'node:net';
|
|
12
12
|
import type * as stream from 'node:stream';
|
|
13
13
|
import type * as url from 'node:url';
|
|
14
|
-
import type { Compiler, LiteralUnion, MultiCompiler, MultiStats, Stats, Watching } from '
|
|
14
|
+
import type { Compiler, LiteralUnion, MultiCompiler, MultiStats, Stats, Watching } from '..';
|
|
15
15
|
type Logger = ReturnType<Compiler['getInfrastructureLogger']>;
|
|
16
16
|
type MultiWatching = MultiCompiler['watch'];
|
|
17
17
|
type BasicServer = import('net').Server | import('tls').Server;
|
|
@@ -36,11 +36,11 @@ type Headers = {
|
|
|
36
36
|
key: string;
|
|
37
37
|
value: string;
|
|
38
38
|
}[] | Record<string, string | string[]>;
|
|
39
|
-
type OutputFileSystem = import('
|
|
39
|
+
type OutputFileSystem = import('..').OutputFileSystem & {
|
|
40
40
|
statSync: import('fs').StatSyncFn;
|
|
41
41
|
readFileSync: typeof import('fs').readFileSync;
|
|
42
42
|
};
|
|
43
|
-
type RspackConfiguration = import('
|
|
43
|
+
type RspackConfiguration = import('..').Configuration;
|
|
44
44
|
type Port = number | LiteralUnion<'auto', string>;
|
|
45
45
|
type HistoryContext = {
|
|
46
46
|
readonly match: RegExpMatchArray;
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './adapter
|
|
2
|
-
export type { RawSourceMap } from './adapterRuleUse
|
|
3
|
-
export * from './defaults
|
|
4
|
-
export * from './normalization
|
|
5
|
-
export type * from './types
|
|
1
|
+
export * from './adapter';
|
|
2
|
+
export type { RawSourceMap } from './adapterRuleUse';
|
|
3
|
+
export * from './defaults';
|
|
4
|
+
export * from './normalization';
|
|
5
|
+
export type * from './types';
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
* Copyright (c) JS Foundation and other contributors
|
|
8
8
|
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
9
|
*/
|
|
10
|
-
import type { HttpUriPluginOptions } from '../builtin-plugin
|
|
11
|
-
import type { Compilation } from '../Compilation
|
|
12
|
-
import type WebpackError from '../lib/WebpackError
|
|
13
|
-
import type { Amd, AssetModuleFilename, Bail,
|
|
10
|
+
import type { HttpUriPluginOptions } from '../builtin-plugin';
|
|
11
|
+
import type { Compilation } from '../Compilation';
|
|
12
|
+
import type WebpackError from '../lib/WebpackError';
|
|
13
|
+
import type { Amd, AssetModuleFilename, Bail, CacheOptions, ChunkFilename, ChunkLoading, ChunkLoadingGlobal, Clean, Context, CrossOriginLoading, CssChunkFilename, CssFilename, Dependencies, DevServer, DevTool, DevtoolFallbackModuleFilenameTemplate, DevtoolModuleFilenameTemplate, DevtoolNamespace, EnabledLibraryTypes, EnabledWasmLoadingTypes, EntryDescription, Environment, Externals, ExternalsPresets, ExternalsType, Filename, GeneratorOptionsByModuleType, GlobalObject, HashDigest, HashDigestLength, HashFunction, HashSalt, HotUpdateChunkFilename, HotUpdateGlobal, HotUpdateMainFilename, Iife, ImportFunctionName, ImportMetaName, Incremental, InfrastructureLogging, LazyCompilationOptions, LibraryOptions, Loader, Mode, Name, Node, NoParseOption, Optimization, OutputModule, ParserOptionsByModuleType, Path, Performance, Plugins, Profile, PublicPath, Resolve, RspackFutureOptions, RspackOptions, RuleSetRules, ScriptType, SnapshotOptions, SourceMapFilename, StatsValue, StrictModuleErrorHandling, Target, TrustedTypes, UniqueName, WasmLoading, Watch, WatchOptions, WebassemblyModuleFilename, WorkerPublicPath } from './types';
|
|
14
14
|
export declare const getNormalizedRspackOptions: (config: RspackOptions) => RspackOptionsNormalized;
|
|
15
15
|
export type EntryDynamicNormalized = () => Promise<EntryStaticNormalized>;
|
|
16
16
|
export type EntryNormalized = EntryDynamicNormalized | EntryStaticNormalized;
|
|
@@ -66,9 +66,9 @@ export interface OutputNormalized {
|
|
|
66
66
|
devtoolModuleFilenameTemplate?: DevtoolModuleFilenameTemplate;
|
|
67
67
|
devtoolFallbackModuleFilenameTemplate?: DevtoolFallbackModuleFilenameTemplate;
|
|
68
68
|
environment?: Environment;
|
|
69
|
+
charset?: boolean;
|
|
69
70
|
chunkLoadTimeout?: number;
|
|
70
71
|
compareBeforeEmit?: boolean;
|
|
71
|
-
bundlerInfo?: BundlerInfoOptions;
|
|
72
72
|
}
|
|
73
73
|
export interface ModuleOptionsNormalized {
|
|
74
74
|
defaultRules?: RuleSetRules;
|
|
@@ -78,7 +78,7 @@ export interface ModuleOptionsNormalized {
|
|
|
78
78
|
noParse?: NoParseOption;
|
|
79
79
|
unsafeCache?: boolean | RegExp;
|
|
80
80
|
}
|
|
81
|
-
export type
|
|
81
|
+
export type ExperimentCacheNormalized = boolean | {
|
|
82
82
|
type: 'memory';
|
|
83
83
|
} | {
|
|
84
84
|
type: 'persistent';
|
|
@@ -95,13 +95,40 @@ export type CacheNormalized = boolean | {
|
|
|
95
95
|
};
|
|
96
96
|
};
|
|
97
97
|
export interface ExperimentsNormalized {
|
|
98
|
+
cache?: ExperimentCacheNormalized;
|
|
99
|
+
/**
|
|
100
|
+
* @deprecated This option is deprecated and will be removed in future versions.
|
|
101
|
+
*
|
|
102
|
+
* Please use the Configuration top-level `lazyCompilation` option instead.
|
|
103
|
+
*/
|
|
104
|
+
lazyCompilation?: false | LazyCompilationOptions;
|
|
98
105
|
asyncWebAssembly?: boolean;
|
|
99
106
|
outputModule?: boolean;
|
|
107
|
+
topLevelAwait?: boolean;
|
|
100
108
|
css?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* @deprecated This option is deprecated, layers is enabled since v1.6.0
|
|
111
|
+
*/
|
|
112
|
+
layers?: boolean;
|
|
101
113
|
incremental?: false | Incremental;
|
|
102
114
|
futureDefaults?: boolean;
|
|
115
|
+
rspackFuture?: RspackFutureOptions;
|
|
103
116
|
buildHttp?: HttpUriPluginOptions;
|
|
117
|
+
parallelLoader?: boolean;
|
|
104
118
|
useInputFileSystem?: false | RegExp[];
|
|
119
|
+
/**
|
|
120
|
+
* @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
|
|
121
|
+
*/
|
|
122
|
+
inlineConst?: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
|
|
125
|
+
*/
|
|
126
|
+
inlineEnum?: boolean;
|
|
127
|
+
typeReexportsPresence?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
|
|
130
|
+
*/
|
|
131
|
+
lazyBarrel?: boolean;
|
|
105
132
|
nativeWatcher?: boolean;
|
|
106
133
|
deferImport?: boolean;
|
|
107
134
|
}
|
|
@@ -130,7 +157,7 @@ export interface RspackOptionsNormalized {
|
|
|
130
157
|
node: Node;
|
|
131
158
|
loader: Loader;
|
|
132
159
|
snapshot: SnapshotOptions;
|
|
133
|
-
cache?:
|
|
160
|
+
cache?: CacheOptions;
|
|
134
161
|
stats: StatsValue;
|
|
135
162
|
optimization: Optimization;
|
|
136
163
|
plugins: Plugins;
|
|
@@ -141,6 +168,7 @@ export interface RspackOptionsNormalized {
|
|
|
141
168
|
devServer?: DevServer;
|
|
142
169
|
ignoreWarnings?: IgnoreWarningsNormalized;
|
|
143
170
|
performance?: Performance;
|
|
171
|
+
profile?: Profile;
|
|
144
172
|
amd?: Amd;
|
|
145
173
|
bail?: Bail;
|
|
146
174
|
}
|
package/dist/config/types.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { AssetInfo, RawFuncUseCtx } from '@rspack/binding';
|
|
2
|
-
import type { HttpUriPluginOptions } from '../builtin-plugin/HttpUriPlugin
|
|
3
|
-
import type { ChunkGraph } from '../ChunkGraph
|
|
4
|
-
import type { Compilation, PathData } from '../Compilation
|
|
5
|
-
import type { Compiler } from '../Compiler
|
|
6
|
-
import type { Chunk } from '../exports
|
|
7
|
-
import type WebpackError from '../lib/WebpackError
|
|
8
|
-
import type { Module } from '../Module
|
|
9
|
-
import type ModuleGraph from '../ModuleGraph
|
|
10
|
-
import type { ResolveCallback } from './adapterRuleUse
|
|
11
|
-
import type { DevServerOptions } from './devServer
|
|
2
|
+
import type { HttpUriPluginOptions } from '../builtin-plugin/HttpUriPlugin';
|
|
3
|
+
import type { ChunkGraph } from '../ChunkGraph';
|
|
4
|
+
import type { Compilation, PathData } from '../Compilation';
|
|
5
|
+
import type { Compiler } from '../Compiler';
|
|
6
|
+
import type { Chunk } from '../exports';
|
|
7
|
+
import type WebpackError from '../lib/WebpackError';
|
|
8
|
+
import type { Module } from '../Module';
|
|
9
|
+
import type ModuleGraph from '../ModuleGraph';
|
|
10
|
+
import type { ResolveCallback } from './adapterRuleUse';
|
|
11
|
+
import type { DevServerOptions } from './devServer';
|
|
12
12
|
/** https://github.com/microsoft/TypeScript/issues/29729 */
|
|
13
13
|
export type LiteralUnion<T extends U, U> = T | (U & Record<never, never>);
|
|
14
14
|
export type FilenameTemplate = string;
|
|
@@ -325,6 +325,14 @@ export type Output = {
|
|
|
325
325
|
crossOriginLoading?: CrossOriginLoading;
|
|
326
326
|
/** This option determines the name of CSS output files on disk. */
|
|
327
327
|
cssFilename?: CssFilename;
|
|
328
|
+
/**
|
|
329
|
+
* @deprecated this config is unused, and will be removed in the future.
|
|
330
|
+
* Rspack adds some metadata in CSS to parse CSS modules, and this configuration determines whether to compress these metadata.
|
|
331
|
+
*
|
|
332
|
+
* The value is `true` in production mode.
|
|
333
|
+
* The value is `false` in development mode.
|
|
334
|
+
* */
|
|
335
|
+
cssHeadDataCompression?: boolean;
|
|
328
336
|
/** This option determines the name of non-initial CSS output files on disk. */
|
|
329
337
|
cssChunkFilename?: CssChunkFilename;
|
|
330
338
|
/**
|
|
@@ -361,6 +369,26 @@ export type Output = {
|
|
|
361
369
|
enabledLibraryTypes?: EnabledLibraryTypes;
|
|
362
370
|
/** Output a library exposing the exports of your entry point. */
|
|
363
371
|
library?: Library;
|
|
372
|
+
/**
|
|
373
|
+
* Specify which export should be exposed as a library.
|
|
374
|
+
* @deprecated We might drop support for this, so prefer to use output.library.export
|
|
375
|
+
* */
|
|
376
|
+
libraryExport?: LibraryExport;
|
|
377
|
+
/**
|
|
378
|
+
* Configure how the library will be exposed.
|
|
379
|
+
* @deprecated Use output.library.type instead as we might drop support for output.libraryTarget in the future.
|
|
380
|
+
* */
|
|
381
|
+
libraryTarget?: LibraryType;
|
|
382
|
+
/**
|
|
383
|
+
* When using output.library.type: "umd", setting output.umdNamedDefine to true will name the AMD module of the UMD build.
|
|
384
|
+
* @deprecated Use output.library.umdNamedDefine instead.
|
|
385
|
+
*/
|
|
386
|
+
umdNamedDefine?: UmdNamedDefine;
|
|
387
|
+
/**
|
|
388
|
+
* Add a comment in the UMD wrapper.
|
|
389
|
+
* @deprecated use output.library.auxiliaryComment instead.
|
|
390
|
+
* */
|
|
391
|
+
auxiliaryComment?: AuxiliaryComment;
|
|
364
392
|
/**
|
|
365
393
|
* Output JavaScript files as module type.
|
|
366
394
|
* Disabled by default as it's an experimental feature. To use it, you must set experiments.outputModule to true.
|
|
@@ -473,16 +501,17 @@ export type Output = {
|
|
|
473
501
|
* @default 120000
|
|
474
502
|
* */
|
|
475
503
|
chunkLoadTimeout?: number;
|
|
504
|
+
/**
|
|
505
|
+
* Add charset="utf-8" to the HTML <script> tag.
|
|
506
|
+
* @default true
|
|
507
|
+
* */
|
|
508
|
+
charset?: boolean;
|
|
476
509
|
/** Tell Rspack what kind of ES-features may be used in the generated runtime-code. */
|
|
477
510
|
environment?: Environment;
|
|
478
511
|
/**
|
|
479
512
|
* Check if to be emitted file already exists and have the same content before writing to output filesystem.
|
|
480
513
|
*/
|
|
481
514
|
compareBeforeEmit?: boolean;
|
|
482
|
-
/**
|
|
483
|
-
* Information about the bundler.
|
|
484
|
-
*/
|
|
485
|
-
bundlerInfo?: BundlerInfoOptions;
|
|
486
515
|
};
|
|
487
516
|
/**
|
|
488
517
|
* Path alias
|
|
@@ -826,33 +855,17 @@ export type JavascriptParserOptions = {
|
|
|
826
855
|
overrideStrict?: 'strict' | 'non-strict';
|
|
827
856
|
/**
|
|
828
857
|
* Control whether renaming of the CommonJS `require` function will be parsed and transformed.
|
|
829
|
-
* @default false
|
|
830
|
-
*/
|
|
831
|
-
requireAlias?: boolean;
|
|
832
|
-
/**
|
|
833
|
-
* Control whether `require` used as an expression (e.g., `const req = require; req('./module')`) will be parsed.
|
|
834
858
|
* @default true
|
|
835
859
|
*/
|
|
860
|
+
requireAlias?: boolean;
|
|
836
861
|
requireAsExpression?: boolean;
|
|
837
|
-
/**
|
|
838
|
-
* Control whether dynamic `require` calls (e.g., `require(variable)`) will be parsed.
|
|
839
|
-
* @default true
|
|
840
|
-
*/
|
|
841
862
|
requireDynamic?: boolean;
|
|
842
|
-
/**
|
|
843
|
-
* Control whether `require.resolve()` calls will be parsed.
|
|
844
|
-
* @default true
|
|
845
|
-
*/
|
|
846
863
|
requireResolve?: boolean;
|
|
847
864
|
/**
|
|
848
865
|
* CommonJS-specific parser options. `true` enables the default behaviour, `{ exports: 'skipInEsm' }` preserves CommonJS export mutations when executed inside ESM.
|
|
849
866
|
* @default true
|
|
850
867
|
*/
|
|
851
868
|
commonjs?: JavascriptParserCommonjsOption;
|
|
852
|
-
/**
|
|
853
|
-
* Control whether dynamic `import()` calls (e.g., `import(variable)`) will be parsed.
|
|
854
|
-
* @default true
|
|
855
|
-
*/
|
|
856
869
|
importDynamic?: boolean;
|
|
857
870
|
/**
|
|
858
871
|
* Enable magic comments for CommonJS require() expressions.
|
|
@@ -862,11 +875,7 @@ export type JavascriptParserOptions = {
|
|
|
862
875
|
typeReexportsPresence?: 'no-tolerant' | 'tolerant' | 'tolerant-no-check';
|
|
863
876
|
/** Whether to enable JSX parsing */
|
|
864
877
|
jsx?: boolean;
|
|
865
|
-
/**
|
|
866
|
-
* Whether to enable defer import.
|
|
867
|
-
* This option is controlled by `experiments.deferImport` and should not be set directly.
|
|
868
|
-
* @default false
|
|
869
|
-
*/
|
|
878
|
+
/** Whether to enable defer import */
|
|
870
879
|
deferImport?: boolean;
|
|
871
880
|
};
|
|
872
881
|
export type JsonParserOptions = {
|
|
@@ -1050,12 +1059,12 @@ type AllowTarget = 'web' | 'webworker' | 'es3' | 'es5' | 'es2015' | 'es2016' | '
|
|
|
1050
1059
|
export type Target = false | AllowTarget | AllowTarget[];
|
|
1051
1060
|
/**
|
|
1052
1061
|
* Specify the default type of externals.
|
|
1053
|
-
* `amd`, `umd`, `system` and `jsonp` externals depend on the `output.
|
|
1062
|
+
* `amd`, `umd`, `system` and `jsonp` externals depend on the `output.libraryTarget` being set to the same value e.g. you can only consume amd externals within an amd library.
|
|
1054
1063
|
* @default 'var'
|
|
1055
1064
|
*/
|
|
1056
1065
|
export type ExternalsType = 'var' | 'module' | 'assign' | 'this' | 'window' | 'self' | 'global' | 'commonjs' | 'commonjs2' | 'commonjs-module' | 'commonjs-static' | 'amd' | 'amd-require' | 'umd' | 'umd2' | 'jsonp' | 'system' | 'promise' | 'import' | 'module-import' | 'script' | 'node-commonjs' | 'commonjs-import';
|
|
1057
1066
|
/**
|
|
1058
|
-
* External item object when both
|
|
1067
|
+
* External item object when both libraryTarget and externalsType is 'umd'
|
|
1059
1068
|
*/
|
|
1060
1069
|
export type ExternalItemUmdValue = {
|
|
1061
1070
|
root: string | string[];
|
|
@@ -1072,7 +1081,7 @@ export type ExternalItemObjectValue = Record<string, string | string[]>;
|
|
|
1072
1081
|
*/
|
|
1073
1082
|
export type ExternalItemValue = string | boolean | string[] | ExternalItemUmdValue
|
|
1074
1083
|
/**
|
|
1075
|
-
* when
|
|
1084
|
+
* when libraryTarget and externalsType is not 'umd'
|
|
1076
1085
|
*/
|
|
1077
1086
|
| ExternalItemObjectValue;
|
|
1078
1087
|
/**
|
|
@@ -1246,22 +1255,7 @@ export type SnapshotOptions = {};
|
|
|
1246
1255
|
* // Disable caching
|
|
1247
1256
|
* cache: false
|
|
1248
1257
|
*/
|
|
1249
|
-
export type CacheOptions = boolean
|
|
1250
|
-
type: 'memory';
|
|
1251
|
-
} | {
|
|
1252
|
-
type: 'persistent';
|
|
1253
|
-
buildDependencies?: string[];
|
|
1254
|
-
version?: string;
|
|
1255
|
-
snapshot?: {
|
|
1256
|
-
immutablePaths?: (string | RegExp)[];
|
|
1257
|
-
unmanagedPaths?: (string | RegExp)[];
|
|
1258
|
-
managedPaths?: (string | RegExp)[];
|
|
1259
|
-
};
|
|
1260
|
-
storage?: {
|
|
1261
|
-
type: 'filesystem';
|
|
1262
|
-
directory?: string;
|
|
1263
|
-
};
|
|
1264
|
-
};
|
|
1258
|
+
export type CacheOptions = boolean;
|
|
1265
1259
|
export type StatsPresets = 'normal' | 'none' | 'verbose' | 'errors-only' | 'errors-warnings' | 'minimal' | 'detailed' | 'summary';
|
|
1266
1260
|
type ModuleFilterItemTypes = RegExp | string | ((name: string, module: any, type: any) => boolean);
|
|
1267
1261
|
type ModuleFilterTypes = boolean | ModuleFilterItemTypes | ModuleFilterItemTypes[];
|
|
@@ -1923,21 +1917,53 @@ export type Optimization = {
|
|
|
1923
1917
|
avoidEntryIife?: boolean;
|
|
1924
1918
|
};
|
|
1925
1919
|
/**
|
|
1926
|
-
*
|
|
1920
|
+
* Options for caching snapshots and intermediate products during the build process.
|
|
1921
|
+
* @description Controls whether caching is enabled or disabled.
|
|
1922
|
+
* @default true in development mode, false in production mode
|
|
1923
|
+
* @example
|
|
1924
|
+
* // Enable caching
|
|
1925
|
+
* cache: true
|
|
1926
|
+
*
|
|
1927
|
+
* // Disable caching
|
|
1928
|
+
* cache: false
|
|
1927
1929
|
*/
|
|
1928
|
-
export type
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1930
|
+
export type ExperimentCacheOptions = boolean | {
|
|
1931
|
+
type: 'memory';
|
|
1932
|
+
} | {
|
|
1933
|
+
type: 'persistent';
|
|
1934
|
+
buildDependencies?: string[];
|
|
1932
1935
|
version?: string;
|
|
1936
|
+
snapshot?: {
|
|
1937
|
+
immutablePaths?: (string | RegExp)[];
|
|
1938
|
+
unmanagedPaths?: (string | RegExp)[];
|
|
1939
|
+
managedPaths?: (string | RegExp)[];
|
|
1940
|
+
};
|
|
1941
|
+
storage?: {
|
|
1942
|
+
type: 'filesystem';
|
|
1943
|
+
directory?: string;
|
|
1944
|
+
};
|
|
1945
|
+
};
|
|
1946
|
+
/**
|
|
1947
|
+
* Options for future Rspack features.
|
|
1948
|
+
*/
|
|
1949
|
+
export type RspackFutureOptions = {
|
|
1933
1950
|
/**
|
|
1934
|
-
*
|
|
1935
|
-
*/
|
|
1936
|
-
bundler?: string;
|
|
1937
|
-
/**
|
|
1938
|
-
* Force specific features.
|
|
1951
|
+
* Information about the bundler.
|
|
1939
1952
|
*/
|
|
1940
|
-
|
|
1953
|
+
bundlerInfo?: {
|
|
1954
|
+
/**
|
|
1955
|
+
* Version of the bundler.
|
|
1956
|
+
*/
|
|
1957
|
+
version?: string;
|
|
1958
|
+
/**
|
|
1959
|
+
* Name of the bundler.
|
|
1960
|
+
*/
|
|
1961
|
+
bundler?: string;
|
|
1962
|
+
/**
|
|
1963
|
+
* Force specific features.
|
|
1964
|
+
*/
|
|
1965
|
+
force?: boolean | ('version' | 'uniqueId')[];
|
|
1966
|
+
};
|
|
1941
1967
|
};
|
|
1942
1968
|
/**
|
|
1943
1969
|
* Options for lazy compilation.
|
|
@@ -2061,6 +2087,16 @@ export type UseInputFileSystem = false | RegExp[];
|
|
|
2061
2087
|
* Experimental features configuration.
|
|
2062
2088
|
*/
|
|
2063
2089
|
export type Experiments = {
|
|
2090
|
+
/**
|
|
2091
|
+
* Enable new cache.
|
|
2092
|
+
*/
|
|
2093
|
+
cache?: ExperimentCacheOptions;
|
|
2094
|
+
/**
|
|
2095
|
+
* Enable lazy compilation.
|
|
2096
|
+
* @deprecated Please use the configuration top-level `lazyCompilation` option instead.
|
|
2097
|
+
* @default false
|
|
2098
|
+
*/
|
|
2099
|
+
lazyCompilation?: boolean | LazyCompilationOptions;
|
|
2064
2100
|
/**
|
|
2065
2101
|
* Enable async WebAssembly.
|
|
2066
2102
|
* Support the new WebAssembly according to the [updated specification](https://github.com/WebAssembly/esm-integration), it makes a WebAssembly module an async module.
|
|
@@ -2072,6 +2108,12 @@ export type Experiments = {
|
|
|
2072
2108
|
* @default false
|
|
2073
2109
|
*/
|
|
2074
2110
|
outputModule?: boolean;
|
|
2111
|
+
/**
|
|
2112
|
+
* Enable top-level await.
|
|
2113
|
+
* @deprecated This option is deprecated, top-level await is enabled by default.
|
|
2114
|
+
* @default true
|
|
2115
|
+
*/
|
|
2116
|
+
topLevelAwait?: boolean;
|
|
2075
2117
|
/**
|
|
2076
2118
|
* Enable CSS support.
|
|
2077
2119
|
*
|
|
@@ -2085,6 +2127,12 @@ export type Experiments = {
|
|
|
2085
2127
|
* - `module.generator["css/module"]`
|
|
2086
2128
|
*/
|
|
2087
2129
|
css?: boolean;
|
|
2130
|
+
/**
|
|
2131
|
+
* Enable module layers feature.
|
|
2132
|
+
* @deprecated This option is deprecated, layers is enabled since v1.6.0
|
|
2133
|
+
* @default false
|
|
2134
|
+
*/
|
|
2135
|
+
layers?: boolean;
|
|
2088
2136
|
/**
|
|
2089
2137
|
* Enable incremental builds.
|
|
2090
2138
|
*/
|
|
@@ -2094,11 +2142,20 @@ export type Experiments = {
|
|
|
2094
2142
|
* @default false
|
|
2095
2143
|
*/
|
|
2096
2144
|
futureDefaults?: boolean;
|
|
2145
|
+
/**
|
|
2146
|
+
* Enable future Rspack features default options.
|
|
2147
|
+
*/
|
|
2148
|
+
rspackFuture?: RspackFutureOptions;
|
|
2097
2149
|
/**
|
|
2098
2150
|
* Enable loading of modules via HTTP/HTTPS requests.
|
|
2099
2151
|
* @default false
|
|
2100
2152
|
*/
|
|
2101
2153
|
buildHttp?: HttpUriOptions;
|
|
2154
|
+
/**
|
|
2155
|
+
* Enable parallel loader
|
|
2156
|
+
* @default false
|
|
2157
|
+
*/
|
|
2158
|
+
parallelLoader?: boolean;
|
|
2102
2159
|
/**
|
|
2103
2160
|
* Enable Node.js input file system
|
|
2104
2161
|
* @default false
|
|
@@ -2109,6 +2166,30 @@ export type Experiments = {
|
|
|
2109
2166
|
* @default false
|
|
2110
2167
|
*/
|
|
2111
2168
|
nativeWatcher?: boolean;
|
|
2169
|
+
/**
|
|
2170
|
+
* Enable inline const feature
|
|
2171
|
+
* @default false
|
|
2172
|
+
* @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
|
|
2173
|
+
*/
|
|
2174
|
+
inlineConst?: boolean;
|
|
2175
|
+
/**
|
|
2176
|
+
* Enable inline enum feature
|
|
2177
|
+
* @default false
|
|
2178
|
+
* @deprecated This option is deprecated, it's already stable. Rspack will remove this option in future version
|
|
2179
|
+
*/
|
|
2180
|
+
inlineEnum?: boolean;
|
|
2181
|
+
/**
|
|
2182
|
+
* Enable type reexports presence feature
|
|
2183
|
+
* @default false
|
|
2184
|
+
* @deprecated This option is deprecated, it's already stable. Rspack will remove this option in future version
|
|
2185
|
+
*/
|
|
2186
|
+
typeReexportsPresence?: boolean;
|
|
2187
|
+
/**
|
|
2188
|
+
* Enable lazy make side effects free barrel file
|
|
2189
|
+
* @default false
|
|
2190
|
+
* @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
|
|
2191
|
+
*/
|
|
2192
|
+
lazyBarrel?: boolean;
|
|
2112
2193
|
/**
|
|
2113
2194
|
* Enable defer import feature
|
|
2114
2195
|
* @default false
|
|
@@ -2147,7 +2228,7 @@ export type WatchOptions = {
|
|
|
2147
2228
|
* Options for devServer, it based on `webpack-dev-server@5`
|
|
2148
2229
|
* */
|
|
2149
2230
|
export type DevServer = DevServerOptions;
|
|
2150
|
-
export type { Middleware as DevServerMiddleware } from './devServer
|
|
2231
|
+
export type { Middleware as DevServerMiddleware } from './devServer';
|
|
2151
2232
|
/**
|
|
2152
2233
|
* Ignore specific warnings.
|
|
2153
2234
|
*/
|
|
@@ -2165,6 +2246,10 @@ export type IgnoreWarnings = (RegExp | {
|
|
|
2165
2246
|
*/
|
|
2166
2247
|
module?: RegExp;
|
|
2167
2248
|
} | ((warning: WebpackError, compilation: Compilation) => boolean))[];
|
|
2249
|
+
/**
|
|
2250
|
+
* Capture a "profile" of the application, including statistics and hints, which can then be dissected using the Analyze tool.
|
|
2251
|
+
* */
|
|
2252
|
+
export type Profile = boolean;
|
|
2168
2253
|
/**
|
|
2169
2254
|
* Set the value of `require.amd` and `define.amd`. Or disable AMD support.
|
|
2170
2255
|
*/
|
|
@@ -2320,6 +2405,10 @@ export type RspackOptions = {
|
|
|
2320
2405
|
* Options for module configuration.
|
|
2321
2406
|
*/
|
|
2322
2407
|
module?: ModuleOptions;
|
|
2408
|
+
/**
|
|
2409
|
+
* Whether to capture a profile of the application.
|
|
2410
|
+
*/
|
|
2411
|
+
profile?: Profile;
|
|
2323
2412
|
/**
|
|
2324
2413
|
* Set the value of `require.amd` or `define.amd`.
|
|
2325
2414
|
* Setting `amd` to false will disable rspack's AMD support.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
|
|
2
|
-
import { RspackBuiltinPlugin } from '../builtin-plugin/base
|
|
3
|
-
import type { Compiler } from '../Compiler
|
|
4
|
-
import type { EntryRuntime, FilenameTemplate, LibraryOptions } from '../config
|
|
2
|
+
import { RspackBuiltinPlugin } from '../builtin-plugin/base';
|
|
3
|
+
import type { Compiler } from '../Compiler';
|
|
4
|
+
import type { EntryRuntime, FilenameTemplate, LibraryOptions } from '../config';
|
|
5
5
|
export type ContainerPluginOptions = {
|
|
6
6
|
exposes: Exposes;
|
|
7
7
|
filename?: FilenameTemplate;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
|
|
2
|
-
import { RspackBuiltinPlugin } from '../builtin-plugin/base
|
|
3
|
-
import type { Compiler } from '../Compiler
|
|
4
|
-
import type { ExternalsType } from '../config
|
|
2
|
+
import { RspackBuiltinPlugin } from '../builtin-plugin/base';
|
|
3
|
+
import type { Compiler } from '../Compiler';
|
|
4
|
+
import type { ExternalsType } from '../config';
|
|
5
5
|
export type ContainerReferencePluginOptions = {
|
|
6
6
|
remoteType: ExternalsType;
|
|
7
7
|
remotes: Remotes;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
|
|
2
|
-
import { RspackBuiltinPlugin } from '../builtin-plugin/base
|
|
3
|
-
import type { Compiler } from '../Compiler
|
|
2
|
+
import { RspackBuiltinPlugin } from '../builtin-plugin/base';
|
|
3
|
+
import type { Compiler } from '../Compiler';
|
|
4
4
|
export type RemoteAliasMap = Record<string, {
|
|
5
5
|
name: string;
|
|
6
6
|
entry?: string;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import type { Compiler } from '../Compiler
|
|
2
|
-
import { type ModuleFederationManifestPluginOptions } from './ModuleFederationManifestPlugin
|
|
3
|
-
import type { ModuleFederationPluginV1Options } from './ModuleFederationPluginV1
|
|
1
|
+
import type { Compiler } from '../Compiler';
|
|
2
|
+
import { type ModuleFederationManifestPluginOptions } from './ModuleFederationManifestPlugin';
|
|
3
|
+
import type { ModuleFederationPluginV1Options } from './ModuleFederationPluginV1';
|
|
4
|
+
import { type ModuleFederationRuntimeExperimentsOptions } from './ModuleFederationRuntimePlugin';
|
|
4
5
|
export interface ModuleFederationPluginOptions extends Omit<ModuleFederationPluginV1Options, 'enhanced'> {
|
|
5
6
|
runtimePlugins?: RuntimePlugins;
|
|
6
7
|
implementation?: string;
|
|
7
8
|
shareStrategy?: 'version-first' | 'loaded-first';
|
|
8
9
|
manifest?: boolean | Omit<ModuleFederationManifestPluginOptions, 'remoteAliasMap' | 'globalName' | 'name' | 'exposes' | 'shared'>;
|
|
10
|
+
experiments?: ModuleFederationRuntimeExperimentsOptions;
|
|
9
11
|
}
|
|
10
12
|
export type RuntimePlugins = string[] | [string, Record<string, unknown>][];
|
|
11
13
|
export declare class ModuleFederationPlugin {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Compiler } from '../Compiler
|
|
2
|
-
import type { EntryRuntime, ExternalsType, LibraryOptions } from '../config
|
|
3
|
-
import { type Shared } from '../sharing/SharePlugin
|
|
4
|
-
import { type Exposes } from './ContainerPlugin
|
|
5
|
-
import { type Remotes } from './ContainerReferencePlugin
|
|
1
|
+
import type { Compiler } from '../Compiler';
|
|
2
|
+
import type { EntryRuntime, ExternalsType, LibraryOptions } from '../config';
|
|
3
|
+
import { type Shared } from '../sharing/SharePlugin';
|
|
4
|
+
import { type Exposes } from './ContainerPlugin';
|
|
5
|
+
import { type Remotes } from './ContainerReferencePlugin';
|
|
6
6
|
export interface ModuleFederationPluginV1Options {
|
|
7
7
|
exposes?: Exposes;
|
|
8
8
|
filename?: string;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
export interface ModuleFederationRuntimeExperimentsOptions {
|
|
2
|
+
asyncStartup?: boolean;
|
|
3
|
+
}
|
|
1
4
|
export interface ModuleFederationRuntimeOptions {
|
|
2
5
|
entryRuntime?: string;
|
|
6
|
+
experiments?: ModuleFederationRuntimeExperimentsOptions;
|
|
3
7
|
}
|
|
4
8
|
export declare const ModuleFederationRuntimePlugin: {
|
|
5
9
|
new (options?: ModuleFederationRuntimeOptions | undefined): {
|
|
6
10
|
name: string;
|
|
7
11
|
_args: [options?: ModuleFederationRuntimeOptions | undefined];
|
|
8
|
-
affectedHooks: keyof import("
|
|
9
|
-
raw(compiler: import("
|
|
10
|
-
apply(compiler: import("
|
|
12
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
13
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
14
|
+
apply(compiler: import("..").Compiler): void;
|
|
11
15
|
};
|
|
12
16
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './ContainerPlugin
|
|
2
|
-
export * from './ContainerReferencePlugin
|
|
3
|
-
export * from './ModuleFederationPlugin
|
|
4
|
-
export * from './ModuleFederationPluginV1
|
|
1
|
+
export * from './ContainerPlugin';
|
|
2
|
+
export * from './ContainerReferencePlugin';
|
|
3
|
+
export * from './ModuleFederationPlugin';
|
|
4
|
+
export * from './ModuleFederationPluginV1';
|