@rspack-debug/core 1.7.1 → 2.0.0-canary-20260116
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 +29 -29
- package/dist/Compiler.d.ts +17 -17
- 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 +6 -4
- 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 +0 -5
- package/dist/builtin-loader/swc/index.d.ts +5 -5
- package/dist/builtin-loader/swc/types.d.ts +2 -8
- 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 +5 -10
- 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 +4 -8
- 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 +6 -10
- 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 +1 -6
- package/dist/builtin-plugin/html-plugin/plugin.d.ts +5 -9
- package/dist/builtin-plugin/html-plugin/taps.d.ts +1 -1
- package/dist/builtin-plugin/index.d.ts +84 -84
- 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 +7 -35
- package/dist/config/target.d.ts +2 -0
- package/dist/config/types.d.ts +73 -155
- 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 +3 -3
- package/dist/container/ModuleFederationPluginV1.d.ts +5 -5
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +3 -3
- package/dist/container/index.d.ts +4 -4
- package/dist/cssExtractHmr.js +2 -27
- package/dist/cssExtractLoader.js +15 -57
- package/dist/exports.d.ts +69 -81
- package/dist/index.d.ts +3 -3
- package/dist/index.js +11340 -11645
- 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/rslib-runtime.js +29 -0
- package/dist/rspack.d.ts +5 -5
- package/dist/rspackOptionsApply.d.ts +1 -1
- package/dist/runtime/moduleFederationDefaultRuntime.d.ts +1 -2
- 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 +3 -6
- 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 +846 -918
- package/hot/dev-server.js +12 -9
- package/hot/emitter.js +5 -1
- package/hot/lazy-compilation-node.js +5 -3
- package/hot/lazy-compilation-web.js +2 -3
- package/hot/log-apply-result.js +8 -5
- package/hot/log.js +17 -7
- package/hot/only-dev-server.js +13 -10
- package/hot/poll.js +11 -8
- package/hot/signal.js +13 -9
- package/package.json +10 -7
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { Module } from '../../Module';
|
|
1
|
+
import type { Module } from '../../Module.js';
|
|
2
2
|
export declare const BuiltinLazyCompilationPlugin: {
|
|
3
3
|
new (currentActiveModules: () => Set<string>, entries: boolean, imports: boolean, client: string, test?: RegExp | ((module: Module) => boolean) | undefined): {
|
|
4
4
|
name: string;
|
|
5
5
|
_args: [currentActiveModules: () => Set<string>, entries: boolean, imports: boolean, client: string, test?: RegExp | ((module: Module) => boolean) | undefined];
|
|
6
|
-
affectedHooks: keyof import("
|
|
7
|
-
raw(compiler: import("
|
|
8
|
-
apply(compiler: import("
|
|
6
|
+
affectedHooks: keyof import("../../index.js").CompilerHooks | undefined;
|
|
7
|
+
raw(compiler: import("../../index.js").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("../../index.js").Compiler): void;
|
|
9
9
|
};
|
|
10
10
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type Compiler, MultiCompiler } from '
|
|
2
|
-
import type { MiddlewareHandler } from '../../config/devServer';
|
|
1
|
+
import { type Compiler, MultiCompiler } from '../../index.js';
|
|
2
|
+
import type { MiddlewareHandler } from '../../config/devServer.js';
|
|
3
3
|
export declare const LAZY_COMPILATION_PREFIX = "/lazy-compilation-using-";
|
|
4
4
|
/**
|
|
5
5
|
* Create a middleware that handles lazy compilation requests from the client.
|
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.js';
|
|
3
|
+
import { type LoaderContext, type LoaderDefinition, type LoaderDefinitionFunction, type PitchLoaderDefinitionFunction } from './adapterRuleUse.js';
|
|
4
|
+
import type { RspackOptionsNormalized } from './normalization.js';
|
|
5
|
+
import type { Resolve } from './types.js';
|
|
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.js';
|
|
3
|
+
import type { Compiler } from '../Compiler.js';
|
|
4
|
+
import { type LoaderObject } from '../loader-runner/index.js';
|
|
5
|
+
import type { Logger } from '../logging/Logger.js';
|
|
6
|
+
import type { Module } from '../Module.js';
|
|
7
|
+
import type { ResolveRequest } from '../Resolver.js';
|
|
8
|
+
import type Hash from '../util/hash/index.js';
|
|
9
|
+
import type { RspackOptionsNormalized } from './normalization.js';
|
|
10
|
+
import type { Mode, PublicPath, Resolve, RuleSetUseItem, Target } from './types.js';
|
|
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.js';
|
|
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.js';
|
|
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 '../index.js';
|
|
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('../index.js').OutputFileSystem & {
|
|
40
40
|
statSync: import('fs').StatSyncFn;
|
|
41
41
|
readFileSync: typeof import('fs').readFileSync;
|
|
42
42
|
};
|
|
43
|
-
type RspackConfiguration = import('
|
|
43
|
+
type RspackConfiguration = import('../index.js').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.js';
|
|
2
|
+
export type { RawSourceMap } from './adapterRuleUse.js';
|
|
3
|
+
export * from './defaults.js';
|
|
4
|
+
export * from './normalization.js';
|
|
5
|
+
export type * from './types.js';
|
|
@@ -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/index.js';
|
|
11
|
+
import type { Compilation } from '../Compilation.js';
|
|
12
|
+
import type WebpackError from '../lib/WebpackError.js';
|
|
13
|
+
import type { Amd, AssetModuleFilename, Bail, BundlerInfoOptions, 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, PublicPath, Resolve, RspackOptions, RuleSetRules, ScriptType, SnapshotOptions, SourceMapFilename, StatsValue, StrictModuleErrorHandling, Target, TrustedTypes, UniqueName, WasmLoading, Watch, WatchOptions, WebassemblyModuleFilename, WorkerPublicPath } from './types.js';
|
|
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;
|
|
70
69
|
chunkLoadTimeout?: number;
|
|
71
70
|
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 CacheNormalized = boolean | {
|
|
82
82
|
type: 'memory';
|
|
83
83
|
} | {
|
|
84
84
|
type: 'persistent';
|
|
@@ -95,40 +95,13 @@ export type ExperimentCacheNormalized = 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;
|
|
105
98
|
asyncWebAssembly?: boolean;
|
|
106
99
|
outputModule?: boolean;
|
|
107
|
-
topLevelAwait?: boolean;
|
|
108
100
|
css?: boolean;
|
|
109
|
-
/**
|
|
110
|
-
* @deprecated This option is deprecated, layers is enabled since v1.6.0
|
|
111
|
-
*/
|
|
112
|
-
layers?: boolean;
|
|
113
101
|
incremental?: false | Incremental;
|
|
114
102
|
futureDefaults?: boolean;
|
|
115
|
-
rspackFuture?: RspackFutureOptions;
|
|
116
103
|
buildHttp?: HttpUriPluginOptions;
|
|
117
|
-
parallelLoader?: boolean;
|
|
118
104
|
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;
|
|
132
105
|
nativeWatcher?: boolean;
|
|
133
106
|
deferImport?: boolean;
|
|
134
107
|
}
|
|
@@ -157,7 +130,7 @@ export interface RspackOptionsNormalized {
|
|
|
157
130
|
node: Node;
|
|
158
131
|
loader: Loader;
|
|
159
132
|
snapshot: SnapshotOptions;
|
|
160
|
-
cache?:
|
|
133
|
+
cache?: CacheNormalized;
|
|
161
134
|
stats: StatsValue;
|
|
162
135
|
optimization: Optimization;
|
|
163
136
|
plugins: Plugins;
|
|
@@ -168,7 +141,6 @@ export interface RspackOptionsNormalized {
|
|
|
168
141
|
devServer?: DevServer;
|
|
169
142
|
ignoreWarnings?: IgnoreWarningsNormalized;
|
|
170
143
|
performance?: Performance;
|
|
171
|
-
profile?: Profile;
|
|
172
144
|
amd?: Amd;
|
|
173
145
|
bail?: Bail;
|
|
174
146
|
}
|
package/dist/config/target.d.ts
CHANGED
|
@@ -38,6 +38,8 @@ export type ApiTargetProperties = {
|
|
|
38
38
|
importScripts: boolean | null;
|
|
39
39
|
/** has importScripts available when creating a worker */
|
|
40
40
|
importScriptsInWorker: boolean | null;
|
|
41
|
+
/** node.js allows to use `import.meta.dirname` and `import.meta.filename` */
|
|
42
|
+
importMetaDirnameAndFilename: boolean | null;
|
|
41
43
|
/** has fetch function available for WebAssembly */
|
|
42
44
|
fetchWasm: boolean | null;
|
|
43
45
|
/** has global variable available */
|
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.js';
|
|
3
|
+
import type { ChunkGraph } from '../ChunkGraph.js';
|
|
4
|
+
import type { Compilation, PathData } from '../Compilation.js';
|
|
5
|
+
import type { Compiler } from '../Compiler.js';
|
|
6
|
+
import type { Chunk } from '../exports.js';
|
|
7
|
+
import type WebpackError from '../lib/WebpackError.js';
|
|
8
|
+
import type { Module } from '../Module.js';
|
|
9
|
+
import type ModuleGraph from '../ModuleGraph.js';
|
|
10
|
+
import type { ResolveCallback } from './adapterRuleUse.js';
|
|
11
|
+
import type { DevServerOptions } from './devServer.js';
|
|
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;
|
|
@@ -272,6 +272,8 @@ export type Environment = {
|
|
|
272
272
|
dynamicImport?: boolean;
|
|
273
273
|
/** The environment supports an async import() when creating a worker, only for web targets at the moment. */
|
|
274
274
|
dynamicImportInWorker?: boolean;
|
|
275
|
+
/** The environment supports `import.meta.dirname` and `import.meta.filename`. */
|
|
276
|
+
importMetaDirnameAndFilename?: boolean;
|
|
275
277
|
/** The environment supports 'for of' iteration ('for (const x of array) { ... }'). */
|
|
276
278
|
forOf?: boolean;
|
|
277
279
|
/** The environment supports 'globalThis'. */
|
|
@@ -323,14 +325,6 @@ export type Output = {
|
|
|
323
325
|
crossOriginLoading?: CrossOriginLoading;
|
|
324
326
|
/** This option determines the name of CSS output files on disk. */
|
|
325
327
|
cssFilename?: CssFilename;
|
|
326
|
-
/**
|
|
327
|
-
* @deprecated this config is unused, and will be removed in the future.
|
|
328
|
-
* Rspack adds some metadata in CSS to parse CSS modules, and this configuration determines whether to compress these metadata.
|
|
329
|
-
*
|
|
330
|
-
* The value is `true` in production mode.
|
|
331
|
-
* The value is `false` in development mode.
|
|
332
|
-
* */
|
|
333
|
-
cssHeadDataCompression?: boolean;
|
|
334
328
|
/** This option determines the name of non-initial CSS output files on disk. */
|
|
335
329
|
cssChunkFilename?: CssChunkFilename;
|
|
336
330
|
/**
|
|
@@ -367,26 +361,6 @@ export type Output = {
|
|
|
367
361
|
enabledLibraryTypes?: EnabledLibraryTypes;
|
|
368
362
|
/** Output a library exposing the exports of your entry point. */
|
|
369
363
|
library?: Library;
|
|
370
|
-
/**
|
|
371
|
-
* Specify which export should be exposed as a library.
|
|
372
|
-
* @deprecated We might drop support for this, so prefer to use output.library.export
|
|
373
|
-
* */
|
|
374
|
-
libraryExport?: LibraryExport;
|
|
375
|
-
/**
|
|
376
|
-
* Configure how the library will be exposed.
|
|
377
|
-
* @deprecated Use output.library.type instead as we might drop support for output.libraryTarget in the future.
|
|
378
|
-
* */
|
|
379
|
-
libraryTarget?: LibraryType;
|
|
380
|
-
/**
|
|
381
|
-
* When using output.library.type: "umd", setting output.umdNamedDefine to true will name the AMD module of the UMD build.
|
|
382
|
-
* @deprecated Use output.library.umdNamedDefine instead.
|
|
383
|
-
*/
|
|
384
|
-
umdNamedDefine?: UmdNamedDefine;
|
|
385
|
-
/**
|
|
386
|
-
* Add a comment in the UMD wrapper.
|
|
387
|
-
* @deprecated use output.library.auxiliaryComment instead.
|
|
388
|
-
* */
|
|
389
|
-
auxiliaryComment?: AuxiliaryComment;
|
|
390
364
|
/**
|
|
391
365
|
* Output JavaScript files as module type.
|
|
392
366
|
* Disabled by default as it's an experimental feature. To use it, you must set experiments.outputModule to true.
|
|
@@ -499,17 +473,16 @@ export type Output = {
|
|
|
499
473
|
* @default 120000
|
|
500
474
|
* */
|
|
501
475
|
chunkLoadTimeout?: number;
|
|
502
|
-
/**
|
|
503
|
-
* Add charset="utf-8" to the HTML <script> tag.
|
|
504
|
-
* @default true
|
|
505
|
-
* */
|
|
506
|
-
charset?: boolean;
|
|
507
476
|
/** Tell Rspack what kind of ES-features may be used in the generated runtime-code. */
|
|
508
477
|
environment?: Environment;
|
|
509
478
|
/**
|
|
510
479
|
* Check if to be emitted file already exists and have the same content before writing to output filesystem.
|
|
511
480
|
*/
|
|
512
481
|
compareBeforeEmit?: boolean;
|
|
482
|
+
/**
|
|
483
|
+
* Information about the bundler.
|
|
484
|
+
*/
|
|
485
|
+
bundlerInfo?: BundlerInfoOptions;
|
|
513
486
|
};
|
|
514
487
|
/**
|
|
515
488
|
* Path alias
|
|
@@ -851,14 +824,35 @@ export type JavascriptParserOptions = {
|
|
|
851
824
|
worker?: string[] | boolean;
|
|
852
825
|
/** Override the module to strict or non-strict. */
|
|
853
826
|
overrideStrict?: 'strict' | 'non-strict';
|
|
827
|
+
/**
|
|
828
|
+
* 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
|
+
* @default true
|
|
835
|
+
*/
|
|
854
836
|
requireAsExpression?: boolean;
|
|
837
|
+
/**
|
|
838
|
+
* Control whether dynamic `require` calls (e.g., `require(variable)`) will be parsed.
|
|
839
|
+
* @default true
|
|
840
|
+
*/
|
|
855
841
|
requireDynamic?: boolean;
|
|
842
|
+
/**
|
|
843
|
+
* Control whether `require.resolve()` calls will be parsed.
|
|
844
|
+
* @default true
|
|
845
|
+
*/
|
|
856
846
|
requireResolve?: boolean;
|
|
857
847
|
/**
|
|
858
848
|
* CommonJS-specific parser options. `true` enables the default behaviour, `{ exports: 'skipInEsm' }` preserves CommonJS export mutations when executed inside ESM.
|
|
859
849
|
* @default true
|
|
860
850
|
*/
|
|
861
851
|
commonjs?: JavascriptParserCommonjsOption;
|
|
852
|
+
/**
|
|
853
|
+
* Control whether dynamic `import()` calls (e.g., `import(variable)`) will be parsed.
|
|
854
|
+
* @default true
|
|
855
|
+
*/
|
|
862
856
|
importDynamic?: boolean;
|
|
863
857
|
/**
|
|
864
858
|
* Enable magic comments for CommonJS require() expressions.
|
|
@@ -868,7 +862,11 @@ export type JavascriptParserOptions = {
|
|
|
868
862
|
typeReexportsPresence?: 'no-tolerant' | 'tolerant' | 'tolerant-no-check';
|
|
869
863
|
/** Whether to enable JSX parsing */
|
|
870
864
|
jsx?: boolean;
|
|
871
|
-
/**
|
|
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
|
+
*/
|
|
872
870
|
deferImport?: boolean;
|
|
873
871
|
};
|
|
874
872
|
export type JsonParserOptions = {
|
|
@@ -1052,12 +1050,12 @@ type AllowTarget = 'web' | 'webworker' | 'es3' | 'es5' | 'es2015' | 'es2016' | '
|
|
|
1052
1050
|
export type Target = false | AllowTarget | AllowTarget[];
|
|
1053
1051
|
/**
|
|
1054
1052
|
* Specify the default type of externals.
|
|
1055
|
-
* `amd`, `umd`, `system` and `jsonp` externals depend on the `output.
|
|
1053
|
+
* `amd`, `umd`, `system` and `jsonp` externals depend on the `output.library.type` being set to the same value e.g. you can only consume amd externals within an amd library.
|
|
1056
1054
|
* @default 'var'
|
|
1057
1055
|
*/
|
|
1058
1056
|
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';
|
|
1059
1057
|
/**
|
|
1060
|
-
* External item object when both
|
|
1058
|
+
* External item object when both library.type and externalsType is 'umd'
|
|
1061
1059
|
*/
|
|
1062
1060
|
export type ExternalItemUmdValue = {
|
|
1063
1061
|
root: string | string[];
|
|
@@ -1074,7 +1072,7 @@ export type ExternalItemObjectValue = Record<string, string | string[]>;
|
|
|
1074
1072
|
*/
|
|
1075
1073
|
export type ExternalItemValue = string | boolean | string[] | ExternalItemUmdValue
|
|
1076
1074
|
/**
|
|
1077
|
-
* when
|
|
1075
|
+
* when library.type and externalsType is not 'umd'
|
|
1078
1076
|
*/
|
|
1079
1077
|
| ExternalItemObjectValue;
|
|
1080
1078
|
/**
|
|
@@ -1248,7 +1246,22 @@ export type SnapshotOptions = {};
|
|
|
1248
1246
|
* // Disable caching
|
|
1249
1247
|
* cache: false
|
|
1250
1248
|
*/
|
|
1251
|
-
export type CacheOptions = boolean
|
|
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
|
+
};
|
|
1252
1265
|
export type StatsPresets = 'normal' | 'none' | 'verbose' | 'errors-only' | 'errors-warnings' | 'minimal' | 'detailed' | 'summary';
|
|
1253
1266
|
type ModuleFilterItemTypes = RegExp | string | ((name: string, module: any, type: any) => boolean);
|
|
1254
1267
|
type ModuleFilterTypes = boolean | ModuleFilterItemTypes | ModuleFilterItemTypes[];
|
|
@@ -1910,53 +1923,21 @@ export type Optimization = {
|
|
|
1910
1923
|
avoidEntryIife?: boolean;
|
|
1911
1924
|
};
|
|
1912
1925
|
/**
|
|
1913
|
-
*
|
|
1914
|
-
* @description Controls whether caching is enabled or disabled.
|
|
1915
|
-
* @default true in development mode, false in production mode
|
|
1916
|
-
* @example
|
|
1917
|
-
* // Enable caching
|
|
1918
|
-
* cache: true
|
|
1919
|
-
*
|
|
1920
|
-
* // Disable caching
|
|
1921
|
-
* cache: false
|
|
1926
|
+
* Information about the bundler.
|
|
1922
1927
|
*/
|
|
1923
|
-
export type
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
buildDependencies?: string[];
|
|
1928
|
+
export type BundlerInfoOptions = {
|
|
1929
|
+
/**
|
|
1930
|
+
* Version of the bundler.
|
|
1931
|
+
*/
|
|
1928
1932
|
version?: string;
|
|
1929
|
-
snapshot?: {
|
|
1930
|
-
immutablePaths?: (string | RegExp)[];
|
|
1931
|
-
unmanagedPaths?: (string | RegExp)[];
|
|
1932
|
-
managedPaths?: (string | RegExp)[];
|
|
1933
|
-
};
|
|
1934
|
-
storage?: {
|
|
1935
|
-
type: 'filesystem';
|
|
1936
|
-
directory?: string;
|
|
1937
|
-
};
|
|
1938
|
-
};
|
|
1939
|
-
/**
|
|
1940
|
-
* Options for future Rspack features.
|
|
1941
|
-
*/
|
|
1942
|
-
export type RspackFutureOptions = {
|
|
1943
1933
|
/**
|
|
1944
|
-
*
|
|
1934
|
+
* Name of the bundler.
|
|
1945
1935
|
*/
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
/**
|
|
1952
|
-
* Name of the bundler.
|
|
1953
|
-
*/
|
|
1954
|
-
bundler?: string;
|
|
1955
|
-
/**
|
|
1956
|
-
* Force specific features.
|
|
1957
|
-
*/
|
|
1958
|
-
force?: boolean | ('version' | 'uniqueId')[];
|
|
1959
|
-
};
|
|
1936
|
+
bundler?: string;
|
|
1937
|
+
/**
|
|
1938
|
+
* Force specific features.
|
|
1939
|
+
*/
|
|
1940
|
+
force?: boolean | ('version' | 'uniqueId')[];
|
|
1960
1941
|
};
|
|
1961
1942
|
/**
|
|
1962
1943
|
* Options for lazy compilation.
|
|
@@ -2080,16 +2061,6 @@ export type UseInputFileSystem = false | RegExp[];
|
|
|
2080
2061
|
* Experimental features configuration.
|
|
2081
2062
|
*/
|
|
2082
2063
|
export type Experiments = {
|
|
2083
|
-
/**
|
|
2084
|
-
* Enable new cache.
|
|
2085
|
-
*/
|
|
2086
|
-
cache?: ExperimentCacheOptions;
|
|
2087
|
-
/**
|
|
2088
|
-
* Enable lazy compilation.
|
|
2089
|
-
* @deprecated Please use the configuration top-level `lazyCompilation` option instead.
|
|
2090
|
-
* @default false
|
|
2091
|
-
*/
|
|
2092
|
-
lazyCompilation?: boolean | LazyCompilationOptions;
|
|
2093
2064
|
/**
|
|
2094
2065
|
* Enable async WebAssembly.
|
|
2095
2066
|
* Support the new WebAssembly according to the [updated specification](https://github.com/WebAssembly/esm-integration), it makes a WebAssembly module an async module.
|
|
@@ -2101,12 +2072,6 @@ export type Experiments = {
|
|
|
2101
2072
|
* @default false
|
|
2102
2073
|
*/
|
|
2103
2074
|
outputModule?: boolean;
|
|
2104
|
-
/**
|
|
2105
|
-
* Enable top-level await.
|
|
2106
|
-
* @deprecated This option is deprecated, top-level await is enabled by default.
|
|
2107
|
-
* @default true
|
|
2108
|
-
*/
|
|
2109
|
-
topLevelAwait?: boolean;
|
|
2110
2075
|
/**
|
|
2111
2076
|
* Enable CSS support.
|
|
2112
2077
|
*
|
|
@@ -2120,12 +2085,6 @@ export type Experiments = {
|
|
|
2120
2085
|
* - `module.generator["css/module"]`
|
|
2121
2086
|
*/
|
|
2122
2087
|
css?: boolean;
|
|
2123
|
-
/**
|
|
2124
|
-
* Enable module layers feature.
|
|
2125
|
-
* @deprecated This option is deprecated, layers is enabled since v1.6.0
|
|
2126
|
-
* @default false
|
|
2127
|
-
*/
|
|
2128
|
-
layers?: boolean;
|
|
2129
2088
|
/**
|
|
2130
2089
|
* Enable incremental builds.
|
|
2131
2090
|
*/
|
|
@@ -2135,20 +2094,11 @@ export type Experiments = {
|
|
|
2135
2094
|
* @default false
|
|
2136
2095
|
*/
|
|
2137
2096
|
futureDefaults?: boolean;
|
|
2138
|
-
/**
|
|
2139
|
-
* Enable future Rspack features default options.
|
|
2140
|
-
*/
|
|
2141
|
-
rspackFuture?: RspackFutureOptions;
|
|
2142
2097
|
/**
|
|
2143
2098
|
* Enable loading of modules via HTTP/HTTPS requests.
|
|
2144
2099
|
* @default false
|
|
2145
2100
|
*/
|
|
2146
2101
|
buildHttp?: HttpUriOptions;
|
|
2147
|
-
/**
|
|
2148
|
-
* Enable parallel loader
|
|
2149
|
-
* @default false
|
|
2150
|
-
*/
|
|
2151
|
-
parallelLoader?: boolean;
|
|
2152
2102
|
/**
|
|
2153
2103
|
* Enable Node.js input file system
|
|
2154
2104
|
* @default false
|
|
@@ -2159,30 +2109,6 @@ export type Experiments = {
|
|
|
2159
2109
|
* @default false
|
|
2160
2110
|
*/
|
|
2161
2111
|
nativeWatcher?: boolean;
|
|
2162
|
-
/**
|
|
2163
|
-
* Enable inline const feature
|
|
2164
|
-
* @default false
|
|
2165
|
-
* @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
|
|
2166
|
-
*/
|
|
2167
|
-
inlineConst?: boolean;
|
|
2168
|
-
/**
|
|
2169
|
-
* Enable inline enum feature
|
|
2170
|
-
* @default false
|
|
2171
|
-
* @deprecated This option is deprecated, it's already stable. Rspack will remove this option in future version
|
|
2172
|
-
*/
|
|
2173
|
-
inlineEnum?: boolean;
|
|
2174
|
-
/**
|
|
2175
|
-
* Enable type reexports presence feature
|
|
2176
|
-
* @default false
|
|
2177
|
-
* @deprecated This option is deprecated, it's already stable. Rspack will remove this option in future version
|
|
2178
|
-
*/
|
|
2179
|
-
typeReexportsPresence?: boolean;
|
|
2180
|
-
/**
|
|
2181
|
-
* Enable lazy make side effects free barrel file
|
|
2182
|
-
* @default false
|
|
2183
|
-
* @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
|
|
2184
|
-
*/
|
|
2185
|
-
lazyBarrel?: boolean;
|
|
2186
2112
|
/**
|
|
2187
2113
|
* Enable defer import feature
|
|
2188
2114
|
* @default false
|
|
@@ -2221,7 +2147,7 @@ export type WatchOptions = {
|
|
|
2221
2147
|
* Options for devServer, it based on `webpack-dev-server@5`
|
|
2222
2148
|
* */
|
|
2223
2149
|
export type DevServer = DevServerOptions;
|
|
2224
|
-
export type { Middleware as DevServerMiddleware } from './devServer';
|
|
2150
|
+
export type { Middleware as DevServerMiddleware } from './devServer.js';
|
|
2225
2151
|
/**
|
|
2226
2152
|
* Ignore specific warnings.
|
|
2227
2153
|
*/
|
|
@@ -2239,10 +2165,6 @@ export type IgnoreWarnings = (RegExp | {
|
|
|
2239
2165
|
*/
|
|
2240
2166
|
module?: RegExp;
|
|
2241
2167
|
} | ((warning: WebpackError, compilation: Compilation) => boolean))[];
|
|
2242
|
-
/**
|
|
2243
|
-
* Capture a "profile" of the application, including statistics and hints, which can then be dissected using the Analyze tool.
|
|
2244
|
-
* */
|
|
2245
|
-
export type Profile = boolean;
|
|
2246
2168
|
/**
|
|
2247
2169
|
* Set the value of `require.amd` and `define.amd`. Or disable AMD support.
|
|
2248
2170
|
*/
|
|
@@ -2398,10 +2320,6 @@ export type RspackOptions = {
|
|
|
2398
2320
|
* Options for module configuration.
|
|
2399
2321
|
*/
|
|
2400
2322
|
module?: ModuleOptions;
|
|
2401
|
-
/**
|
|
2402
|
-
* Whether to capture a profile of the application.
|
|
2403
|
-
*/
|
|
2404
|
-
profile?: Profile;
|
|
2405
2323
|
/**
|
|
2406
2324
|
* Set the value of `require.amd` or `define.amd`.
|
|
2407
2325
|
* 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.js';
|
|
3
|
+
import type { Compiler } from '../Compiler.js';
|
|
4
|
+
import type { EntryRuntime, FilenameTemplate, LibraryOptions } from '../config/index.js';
|
|
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.js';
|
|
3
|
+
import type { Compiler } from '../Compiler.js';
|
|
4
|
+
import type { ExternalsType } from '../config/index.js';
|
|
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.js';
|
|
3
|
+
import type { Compiler } from '../Compiler.js';
|
|
4
4
|
export type RemoteAliasMap = Record<string, {
|
|
5
5
|
name: string;
|
|
6
6
|
entry?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Compiler } from '../Compiler';
|
|
2
|
-
import { type ModuleFederationManifestPluginOptions } from './ModuleFederationManifestPlugin';
|
|
3
|
-
import type { ModuleFederationPluginV1Options } from './ModuleFederationPluginV1';
|
|
1
|
+
import type { Compiler } from '../Compiler.js';
|
|
2
|
+
import { type ModuleFederationManifestPluginOptions } from './ModuleFederationManifestPlugin.js';
|
|
3
|
+
import type { ModuleFederationPluginV1Options } from './ModuleFederationPluginV1.js';
|
|
4
4
|
export interface ModuleFederationPluginOptions extends Omit<ModuleFederationPluginV1Options, 'enhanced'> {
|
|
5
5
|
runtimePlugins?: RuntimePlugins;
|
|
6
6
|
implementation?: string;
|
|
@@ -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.js';
|
|
2
|
+
import type { EntryRuntime, ExternalsType, LibraryOptions } from '../config/index.js';
|
|
3
|
+
import { type Shared } from '../sharing/SharePlugin.js';
|
|
4
|
+
import { type Exposes } from './ContainerPlugin.js';
|
|
5
|
+
import { type Remotes } from './ContainerReferencePlugin.js';
|
|
6
6
|
export interface ModuleFederationPluginV1Options {
|
|
7
7
|
exposes?: Exposes;
|
|
8
8
|
filename?: string;
|