@rspack-debug/browser 1.7.3 → 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BuildInfo.d.ts +3 -3
- package/dist/Chunk.d.ts +3 -3
- package/dist/ChunkGraph.d.ts +2 -2
- package/dist/Chunks.d.ts +2 -2
- package/dist/Compilation.d.ts +3 -3
- package/dist/Compiler.d.ts +5 -2
- package/dist/ConcatenatedModule.d.ts +1 -1
- package/dist/ContextModule.d.ts +1 -1
- package/dist/Diagnostics.d.ts +1 -1
- package/dist/Entrypoint.d.ts +1 -1
- package/dist/ExportsInfo.d.ts +1 -1
- package/dist/ExternalModule.d.ts +1 -1
- package/dist/FileSystem.d.ts +1 -1
- package/dist/Module.d.ts +3 -3
- package/dist/ModuleGraph.d.ts +1 -1
- package/dist/MultiCompiler.d.ts +1 -1
- package/dist/NativeWatchFileSystem.d.ts +1 -1
- package/dist/NormalModule.d.ts +2 -2
- package/dist/NormalModuleFactory.d.ts +1 -1
- package/dist/Resolver.d.ts +1 -1
- package/dist/ResolverFactory.d.ts +1 -1
- package/dist/RspackError.d.ts +2 -2
- package/dist/RuntimeGlobals.d.ts +2 -2
- package/dist/RuntimeModule.d.ts +1 -1
- package/dist/builtin-loader/lightningcss/index.d.ts +11 -14
- package/dist/builtin-loader/lightningcss/target.d.ts +4 -0
- package/dist/builtin-loader/swc/index.d.ts +2 -2
- package/dist/builtin-loader/swc/types.d.ts +2 -4
- package/dist/builtin-plugin/BannerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CircularDependencyRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CssChunkingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableLibraryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EsmLibraryPlugin.d.ts +2 -0
- package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ExternalsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -1
- package/dist/builtin-plugin/HotModuleReplacementPlugin.d.ts +1 -1
- package/dist/builtin-plugin/HttpUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
- package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +5 -9
- package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RsdoctorPlugin.d.ts +2 -6
- package/dist/builtin-plugin/RslibPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RstestPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -5
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SplitChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +2 -2
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +3 -2
- package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +1 -1
- package/dist/builtin-plugin/WorkerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/base.d.ts +1 -1
- package/dist/builtin-plugin/css-extract/index.d.ts +1 -1
- package/dist/builtin-plugin/html-plugin/hooks.d.ts +1 -1
- package/dist/builtin-plugin/html-plugin/options.d.ts +0 -5
- package/dist/builtin-plugin/html-plugin/plugin.d.ts +2 -6
- package/dist/builtin-plugin/index.d.ts +1 -0
- package/dist/builtin-plugin/rsc/Coordinator.d.ts +8 -0
- package/dist/builtin-plugin/rsc/RscClientPlugin.d.ts +13 -0
- package/dist/builtin-plugin/rsc/RscServerPlugin.d.ts +14 -0
- package/dist/builtin-plugin/rsc/index.d.ts +24 -0
- package/dist/config/adapter.d.ts +1 -1
- package/dist/config/adapterRuleUse.d.ts +3 -2
- package/dist/config/defaults.d.ts +4 -2
- package/dist/config/normalization.d.ts +5 -33
- package/dist/config/target.d.ts +14 -11
- package/dist/config/types.d.ts +84 -169
- package/dist/container/ContainerPlugin.d.ts +1 -1
- package/dist/container/ContainerReferencePlugin.d.ts +1 -1
- package/dist/container/ModuleFederationManifestPlugin.d.ts +1 -1
- package/dist/container/ModuleFederationPlugin.d.ts +2 -0
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +4 -0
- package/dist/exports.d.ts +7 -19
- package/dist/{index.mjs → index.js} +2719 -3904
- package/dist/lib/DllPlugin.d.ts +1 -1
- package/dist/lib/DllReferencePlugin.d.ts +3 -3
- package/dist/lib/WebpackError.d.ts +1 -1
- package/dist/loader-runner/index.d.ts +1 -1
- package/dist/loader-runner/worker.d.ts +1 -1
- package/dist/napi-binding.d.ts +70 -62
- package/dist/rspack.wasi-browser.js +1 -0
- package/dist/runtime/moduleFederationDefaultRuntime.d.ts +1 -2
- package/dist/sharing/ConsumeSharedPlugin.d.ts +1 -1
- package/dist/sharing/ProvideSharedPlugin.d.ts +1 -1
- package/dist/sharing/ShareRuntimePlugin.d.ts +1 -1
- package/dist/stats/StatsFactory.d.ts +1 -1
- package/dist/stats/statsFactoryUtils.d.ts +2 -5
- package/dist/swc.d.ts +1 -1
- package/dist/taps/compilation.d.ts +1 -1
- package/dist/taps/types.d.ts +1 -1
- package/dist/util/SplitChunkSize.d.ts +1 -1
- package/dist/util/source.d.ts +1 -1
- package/dist/util/targetsVersion.d.ts +2 -0
- package/package.json +2 -3
- package/dist/builtin-loader/index.d.ts +0 -1
- /package/dist/{index.mjs.LICENSE.txt → index.js.LICENSE.txt} +0 -0
- /package/dist/{rslib-runtime.mjs → rslib-runtime.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type RawRslibPluginOptions } from '
|
|
1
|
+
import { type RawRslibPluginOptions } from '../binding';
|
|
2
2
|
export type RslibPluginArgument = Partial<Omit<RawRslibPluginOptions, 'handler'>> | ((percentage: number, msg: string, ...args: string[]) => void) | undefined;
|
|
3
3
|
export declare const RslibPlugin: {
|
|
4
4
|
new (rslib: RawRslibPluginOptions): {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type RawRstestPluginOptions } from '
|
|
1
|
+
import { type RawRstestPluginOptions } from '../binding';
|
|
2
2
|
export type RstestPluginArgument = Partial<Omit<RawRstestPluginOptions, 'handler'>> | ((percentage: number, msg: string, ...args: string[]) => void) | undefined;
|
|
3
3
|
export declare const RstestPlugin: {
|
|
4
4
|
new (rstest: RawRstestPluginOptions): {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type RawRuntimeChunkOptions } from '
|
|
1
|
+
import { type RawRuntimeChunkOptions } from '../binding';
|
|
2
2
|
export type RuntimeChunkPluginOptions = RawRuntimeChunkOptions;
|
|
3
3
|
export declare const RuntimeChunkPlugin: {
|
|
4
4
|
new (options: RawRuntimeChunkOptions): {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import binding from '
|
|
1
|
+
import binding from '../binding';
|
|
2
2
|
import * as liteTapable from '@rspack/lite-tapable';
|
|
3
3
|
import type { Chunk } from '../Chunk';
|
|
4
4
|
import { type Compilation } from '../Compilation';
|
|
@@ -19,10 +19,6 @@ export type RuntimePluginHooks = {
|
|
|
19
19
|
linkPrefetch: liteTapable.SyncWaterfallHook<[string, Chunk]>;
|
|
20
20
|
};
|
|
21
21
|
declare const RuntimePlugin: typeof RuntimePluginImpl & {
|
|
22
|
-
/**
|
|
23
|
-
* @deprecated Use `getCompilationHooks` instead.
|
|
24
|
-
*/
|
|
25
|
-
getHooks: (compilation: Compilation) => RuntimePluginHooks;
|
|
26
22
|
getCompilationHooks: (compilation: Compilation) => RuntimePluginHooks;
|
|
27
23
|
};
|
|
28
24
|
export declare const createRuntimePluginHooksRegisters: CreatePartialRegisters<`RuntimePlugin`>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type SourceMapDevToolPluginOptions } from '
|
|
1
|
+
import { type SourceMapDevToolPluginOptions } from '../binding';
|
|
2
2
|
export type { SourceMapDevToolPluginOptions };
|
|
3
3
|
export declare const SourceMapDevToolPlugin: {
|
|
4
4
|
new (options: SourceMapDevToolPluginOptions): {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BuiltinPlugin, BuiltinPluginName } from '
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
|
|
2
2
|
import type { Compiler } from '../Compiler';
|
|
3
3
|
import type { OptimizationSplitChunksOptions } from '../config';
|
|
4
4
|
import { RspackBuiltinPlugin } from './base';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type RawSubresourceIntegrityPluginOptions } from '
|
|
1
|
+
import { type RawSubresourceIntegrityPluginOptions } from '../binding';
|
|
2
2
|
import type { Compiler } from '../Compiler';
|
|
3
3
|
export type SubresourceIntegrityHashFunction = 'sha256' | 'sha384' | 'sha512';
|
|
4
4
|
export type SubresourceIntegrityPluginOptions = {
|
|
@@ -20,7 +20,7 @@ declare const NativeSubresourceIntegrityPlugin: {
|
|
|
20
20
|
new (options: NativeSubresourceIntegrityPluginOptions): {
|
|
21
21
|
name: string;
|
|
22
22
|
_args: [options: NativeSubresourceIntegrityPluginOptions];
|
|
23
|
-
affectedHooks: keyof import("
|
|
23
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
24
24
|
raw(compiler: Compiler): import("../binding").BuiltinPlugin;
|
|
25
25
|
apply(compiler: Compiler): void;
|
|
26
26
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Compiler } from '../Compiler';
|
|
1
2
|
import type { LiteralUnion } from '../config';
|
|
2
3
|
import type { AssetConditions } from '../util/assetCondition';
|
|
3
4
|
type ExtractCommentsCondition = boolean | RegExp;
|
|
@@ -208,8 +209,8 @@ export declare const SwcJsMinimizerRspackPlugin: {
|
|
|
208
209
|
name: string;
|
|
209
210
|
_args: [options?: SwcJsMinimizerRspackPluginOptions | undefined];
|
|
210
211
|
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
211
|
-
raw(compiler:
|
|
212
|
-
apply(compiler:
|
|
212
|
+
raw(compiler: Compiler): import("../binding").BuiltinPlugin;
|
|
213
|
+
apply(compiler: Compiler): void;
|
|
213
214
|
};
|
|
214
215
|
};
|
|
215
216
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BuiltinPlugin, BuiltinPluginName } from '
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
|
|
2
2
|
import type { Compiler } from '../Compiler';
|
|
3
3
|
import { RspackBuiltinPlugin } from './base';
|
|
4
4
|
export declare class WebWorkerTemplatePlugin extends RspackBuiltinPlugin {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BuiltinPlugin, BuiltinPluginName } from '
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
|
|
2
2
|
import type { Compiler } from '../Compiler';
|
|
3
3
|
import type { ChunkLoading, OutputModule, WasmLoading, WorkerPublicPath } from '../config';
|
|
4
4
|
import { RspackBuiltinPlugin } from './base';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type RawCssExtractPluginOption } from '
|
|
1
|
+
import { type RawCssExtractPluginOption } from '../../binding';
|
|
2
2
|
import type { Compiler, LiteralUnion } from '../..';
|
|
3
3
|
export * from './loader';
|
|
4
4
|
export type { CssExtractRspackLoaderOptions } from './loader';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JsAfterEmitData, JsAfterTemplateExecutionData, JsAlterAssetTagGroupsData, JsAlterAssetTagsData, JsBeforeAssetTagGenerationData, JsBeforeEmitData } from '
|
|
1
|
+
import type { JsAfterEmitData, JsAfterTemplateExecutionData, JsAlterAssetTagGroupsData, JsAlterAssetTagsData, JsBeforeAssetTagGenerationData, JsBeforeEmitData } from '../../binding';
|
|
2
2
|
import * as liteTapable from '@rspack/lite-tapable';
|
|
3
3
|
import { type Compilation } from '../../Compilation';
|
|
4
4
|
import type { HtmlRspackPluginOptions } from './options';
|
|
@@ -52,11 +52,6 @@ export type HtmlRspackPluginOptions = {
|
|
|
52
52
|
* @default "auto"
|
|
53
53
|
*/
|
|
54
54
|
chunksSortMode?: 'auto' | 'manual';
|
|
55
|
-
/**
|
|
56
|
-
* Configure the SRI hash algorithm, which is disabled by default.
|
|
57
|
-
* @deprecated Use `experiments.SubresourceIntegrityPlugin` instead.
|
|
58
|
-
*/
|
|
59
|
-
sri?: 'sha256' | 'sha384' | 'sha512';
|
|
60
55
|
/**
|
|
61
56
|
* Controls whether to minify the output, disabled by default.
|
|
62
57
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type JsHtmlPluginTag } from '
|
|
1
|
+
import { type JsHtmlPluginTag } from '../../binding';
|
|
2
2
|
import type { Compilation } from '../../Compilation';
|
|
3
3
|
import type { Compiler } from '../../Compiler';
|
|
4
4
|
import { type HtmlRspackPluginHooks } from './hooks';
|
|
@@ -7,16 +7,12 @@ declare const HtmlRspackPluginImpl: {
|
|
|
7
7
|
new (c?: HtmlRspackPluginOptions | undefined): {
|
|
8
8
|
name: string;
|
|
9
9
|
_args: [c?: HtmlRspackPluginOptions | undefined];
|
|
10
|
-
affectedHooks: keyof import("
|
|
10
|
+
affectedHooks: keyof import("../..").CompilerHooks | undefined;
|
|
11
11
|
raw(compiler: Compiler): import("../../binding").BuiltinPlugin;
|
|
12
12
|
apply(compiler: Compiler): void;
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
declare const HtmlRspackPlugin: typeof HtmlRspackPluginImpl & {
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated Use `getCompilationHooks` instead.
|
|
18
|
-
*/
|
|
19
|
-
getHooks: (compilation: Compilation) => HtmlRspackPluginHooks;
|
|
20
16
|
getCompilationHooks: (compilation: Compilation) => HtmlRspackPluginHooks;
|
|
21
17
|
createHtmlTagObject: (tagName: string, attributes?: Record<string, string | boolean>, innerHTML?: string) => JsHtmlPluginTag;
|
|
22
18
|
version: number;
|
|
@@ -73,6 +73,7 @@ export * from './RslibPlugin';
|
|
|
73
73
|
export * from './RstestPlugin';
|
|
74
74
|
export * from './RuntimeChunkPlugin';
|
|
75
75
|
export * from './RuntimePlugin';
|
|
76
|
+
export { rsc } from './rsc';
|
|
76
77
|
export * from './SideEffectsFlagPlugin';
|
|
77
78
|
export * from './SizeLimitsPlugin';
|
|
78
79
|
export * from './SourceMapDevToolPlugin';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Compiler } from '../../Compiler';
|
|
2
|
+
export declare const GET_OR_INIT_BINDING: unique symbol;
|
|
3
|
+
export declare class Coordinator {
|
|
4
|
+
#private;
|
|
5
|
+
constructor();
|
|
6
|
+
applyServerCompiler(serverCompiler: Compiler): void;
|
|
7
|
+
applyClientCompiler(clientCompiler: Compiler): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type binding from '../../binding';
|
|
2
|
+
import type { Compiler } from '../..';
|
|
3
|
+
import { RspackBuiltinPlugin } from '../base';
|
|
4
|
+
import { type Coordinator } from './Coordinator';
|
|
5
|
+
export type RscClientPluginOptions = {
|
|
6
|
+
coordinator: Coordinator;
|
|
7
|
+
};
|
|
8
|
+
export declare class RscClientPlugin extends RspackBuiltinPlugin {
|
|
9
|
+
#private;
|
|
10
|
+
name: string;
|
|
11
|
+
constructor(options: RscClientPluginOptions);
|
|
12
|
+
raw(compiler: Compiler): binding.BuiltinPlugin;
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type binding from '../../binding';
|
|
2
|
+
import type { Compiler } from '../..';
|
|
3
|
+
import { RspackBuiltinPlugin } from '../base';
|
|
4
|
+
import { type Coordinator } from './Coordinator';
|
|
5
|
+
export type RscServerPluginOptions = {
|
|
6
|
+
coordinator: Coordinator;
|
|
7
|
+
onServerComponentChanges?: () => Promise<void>;
|
|
8
|
+
};
|
|
9
|
+
export declare class RscServerPlugin extends RspackBuiltinPlugin {
|
|
10
|
+
#private;
|
|
11
|
+
name: string;
|
|
12
|
+
constructor(options: RscServerPluginOptions);
|
|
13
|
+
raw(compiler: Compiler): binding.BuiltinPlugin;
|
|
14
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { RscClientPlugin, type RscClientPluginOptions } from './RscClientPlugin';
|
|
2
|
+
import { RscServerPlugin } from './RscServerPlugin';
|
|
3
|
+
declare class ServerPlugin extends RscServerPlugin {
|
|
4
|
+
constructor(options?: Omit<RscClientPluginOptions, 'coordinator'>);
|
|
5
|
+
}
|
|
6
|
+
declare class ClientPlugin extends RscClientPlugin {
|
|
7
|
+
}
|
|
8
|
+
export declare const rsc: {
|
|
9
|
+
createPlugins: () => {
|
|
10
|
+
ServerPlugin: new (options?: Omit<RscClientPluginOptions, "coordinator">) => ServerPlugin;
|
|
11
|
+
ClientPlugin: new () => ClientPlugin;
|
|
12
|
+
};
|
|
13
|
+
Layers: {
|
|
14
|
+
/**
|
|
15
|
+
* The layer for server-only runtime and picking up `react-server` export conditions.
|
|
16
|
+
*/
|
|
17
|
+
readonly rsc: "react-server-components";
|
|
18
|
+
/**
|
|
19
|
+
* Server Side Rendering layer for app.
|
|
20
|
+
*/
|
|
21
|
+
readonly ssr: "server-side-rendering";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export {};
|
package/dist/config/adapter.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type RawOptions } from '
|
|
1
|
+
import { type RawOptions } from '../binding';
|
|
2
2
|
import type { Compiler } from '../Compiler';
|
|
3
3
|
import { type LoaderContext, type LoaderDefinition, type LoaderDefinitionFunction, type PitchLoaderDefinitionFunction } from './adapterRuleUse';
|
|
4
4
|
import type { RspackOptionsNormalized } from './normalization';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AssetInfo, RawModuleRuleUse, RawOptions } from '
|
|
1
|
+
import type { AssetInfo, RawModuleRuleUse, RawOptions } from '../binding';
|
|
2
2
|
import type { Compilation } from '../Compilation';
|
|
3
3
|
import type { Compiler } from '../Compiler';
|
|
4
4
|
import { type LoaderObject } from '../loader-runner';
|
|
@@ -7,7 +7,7 @@ import type { Module } from '../Module';
|
|
|
7
7
|
import type { ResolveRequest } from '../Resolver';
|
|
8
8
|
import type Hash from '../util/hash';
|
|
9
9
|
import type { RspackOptionsNormalized } from './normalization';
|
|
10
|
-
import type { Mode, PublicPath, Resolve, RuleSetUseItem, Target } from './types';
|
|
10
|
+
import type { Mode, PublicPath, Resolve, RuleSetLoaderWithOptions, RuleSetUseItem, Target } from './types';
|
|
11
11
|
export declare const BUILTIN_LOADER_PREFIX = "builtin:";
|
|
12
12
|
export interface ComposeJsUseOptions {
|
|
13
13
|
context: RawOptions['context'];
|
|
@@ -387,5 +387,6 @@ export type LoaderDefinition<OptionsType = {}, ContextAdditions = {}> = LoaderDe
|
|
|
387
387
|
pitch?: PitchLoaderDefinitionFunction;
|
|
388
388
|
};
|
|
389
389
|
export declare function createRawModuleRuleUses(uses: RuleSetUseItem | RuleSetUseItem[], path: string, options: ComposeJsUseOptions): RawModuleRuleUse[];
|
|
390
|
+
export type GetLoaderOptions = (o: RuleSetLoaderWithOptions['options'], options: ComposeJsUseOptions) => RuleSetLoaderWithOptions['options'];
|
|
390
391
|
export declare function isUseSourceMap(devtool: RspackOptionsNormalized['devtool']): boolean;
|
|
391
392
|
export declare function isUseSimpleSourceMap(devtool: RspackOptionsNormalized['devtool']): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RspackOptionsNormalized } from './normalization';
|
|
2
|
-
export declare const applyRspackOptionsDefaults: (options: RspackOptionsNormalized) => {
|
|
3
|
-
platform:
|
|
2
|
+
export declare const applyRspackOptionsDefaults: (options: RspackOptionsNormalized) => false | {
|
|
3
|
+
platform: {
|
|
4
4
|
web: boolean | null | undefined;
|
|
5
5
|
browser: boolean | null | undefined;
|
|
6
6
|
webworker: boolean | null | undefined;
|
|
@@ -8,6 +8,8 @@ export declare const applyRspackOptionsDefaults: (options: RspackOptionsNormaliz
|
|
|
8
8
|
nwjs: boolean | null | undefined;
|
|
9
9
|
electron: boolean | null | undefined;
|
|
10
10
|
};
|
|
11
|
+
esVersion: number | null | undefined;
|
|
12
|
+
targets: Record<string, string> | null | undefined;
|
|
11
13
|
};
|
|
12
14
|
export declare const applyRspackOptionsBaseDefaults: (options: RspackOptionsNormalized) => void;
|
|
13
15
|
export declare const getPnpDefault: () => boolean;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import type { HttpUriPluginOptions } from '../builtin-plugin';
|
|
11
11
|
import type { Compilation } from '../Compilation';
|
|
12
12
|
import type WebpackError from '../lib/WebpackError';
|
|
13
|
-
import type { Amd, AssetModuleFilename, Bail,
|
|
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';
|
|
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,12 @@ 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
|
-
incremental?: false | Incremental;
|
|
114
101
|
futureDefaults?: boolean;
|
|
115
|
-
rspackFuture?: RspackFutureOptions;
|
|
116
102
|
buildHttp?: HttpUriPluginOptions;
|
|
117
|
-
parallelLoader?: boolean;
|
|
118
103
|
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
104
|
nativeWatcher?: boolean;
|
|
133
105
|
deferImport?: boolean;
|
|
134
106
|
}
|
|
@@ -157,18 +129,18 @@ export interface RspackOptionsNormalized {
|
|
|
157
129
|
node: Node;
|
|
158
130
|
loader: Loader;
|
|
159
131
|
snapshot: SnapshotOptions;
|
|
160
|
-
cache?:
|
|
132
|
+
cache?: CacheNormalized;
|
|
161
133
|
stats: StatsValue;
|
|
162
134
|
optimization: Optimization;
|
|
163
135
|
plugins: Plugins;
|
|
164
136
|
experiments: ExperimentsNormalized;
|
|
165
137
|
lazyCompilation?: false | LazyCompilationOptions;
|
|
138
|
+
incremental?: false | Incremental;
|
|
166
139
|
watch?: Watch;
|
|
167
140
|
watchOptions: WatchOptions;
|
|
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
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The following code is modified based on
|
|
3
|
+
* https://github.com/webpack/webpack/blob/4b4ca3b/lib/config/target.js
|
|
4
|
+
*
|
|
5
|
+
* MIT Licensed
|
|
6
|
+
* Author Tobias Koppers @sokra
|
|
7
|
+
* Copyright (c) JS Foundation and other contributors
|
|
8
|
+
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
|
+
*/
|
|
1
10
|
/**
|
|
2
11
|
* @param context the context directory
|
|
3
12
|
* @returns default target
|
|
@@ -73,21 +82,15 @@ export type EcmaTargetProperties = {
|
|
|
73
82
|
/** async functions and await are available */
|
|
74
83
|
asyncFunction: boolean | null;
|
|
75
84
|
};
|
|
85
|
+
export type ExtractedTargetProperties = {
|
|
86
|
+
esVersion?: number | null;
|
|
87
|
+
targets?: Record<string, string> | null;
|
|
88
|
+
};
|
|
76
89
|
type Never<T> = {
|
|
77
90
|
[P in keyof T]?: never;
|
|
78
91
|
};
|
|
79
92
|
type Mix<A, B> = (A & Never<B>) | (Never<A> & B) | (A & B);
|
|
80
|
-
export type TargetProperties = Mix<Mix<PlatformTargetProperties, ElectronContextTargetProperties>, Mix<ApiTargetProperties, EcmaTargetProperties
|
|
81
|
-
/**
|
|
82
|
-
* @param target the target
|
|
83
|
-
* @param context the context directory
|
|
84
|
-
* @returns target properties
|
|
85
|
-
*/
|
|
93
|
+
export type TargetProperties = Mix<Mix<PlatformTargetProperties, ElectronContextTargetProperties>, Mix<ApiTargetProperties, EcmaTargetProperties>> & ExtractedTargetProperties;
|
|
86
94
|
export declare const getTargetProperties: (target: string, context: string) => TargetProperties;
|
|
87
|
-
/**
|
|
88
|
-
* @param targets the targets
|
|
89
|
-
* @param context the context directory
|
|
90
|
-
* @returns target properties
|
|
91
|
-
*/
|
|
92
95
|
export declare const getTargetsProperties: (targets: string[], context: string) => TargetProperties;
|
|
93
96
|
export {};
|