@rspack-debug/browser 2.0.0-canary-20260116 → 2.0.0-rc.0
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 +6 -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 +2 -2
- package/dist/Module.d.ts +3 -3
- package/dist/ModuleGraph.d.ts +2 -1
- package/dist/NativeWatchFileSystem.d.ts +1 -1
- package/dist/NormalModule.d.ts +2 -3
- 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/browser/BrowserRequirePlugin.d.ts +1 -1
- package/dist/browser/fs.d.ts +1 -1
- package/dist/browser/middleware.d.ts +1 -0
- package/dist/builtin-loader/lightningcss/index.d.ts +11 -9
- 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/pluginImport.d.ts +1 -1
- package/dist/builtin-loader/swc/types.d.ts +36 -1
- 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/EnableLibraryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EsmLibraryPlugin.d.ts +5 -1
- package/dist/builtin-plugin/EsmNodeTargetPlugin.d.ts +9 -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/LightningCssMinimizerRspackPlugin.d.ts +5 -4
- 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 +5 -4
- package/dist/builtin-plugin/RsdoctorPlugin.d.ts +2 -2
- 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 -1
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SplitChunksPlugin.d.ts +2 -1
- package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +1 -1
- 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 +2 -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/plugin.d.ts +1 -1
- package/dist/builtin-plugin/index.d.ts +2 -0
- package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +3 -3
- 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 +39 -0
- package/dist/builtin-plugin/rsc/index.d.ts +24 -0
- package/dist/checkNodeVersion.d.ts +1 -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/devServer.d.ts +102 -237
- package/dist/config/normalization.d.ts +2 -3
- package/dist/config/target.d.ts +14 -11
- package/dist/config/types.d.ts +152 -63
- package/dist/container/ContainerPlugin.d.ts +4 -3
- package/dist/container/ContainerReferencePlugin.d.ts +5 -4
- package/dist/container/ModuleFederationManifestPlugin.d.ts +11 -4
- package/dist/container/ModuleFederationPlugin.d.ts +20 -1
- package/dist/container/ModuleFederationPluginV1.d.ts +2 -2
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +4 -0
- package/dist/exports.d.ts +13 -10
- package/dist/index.d.ts +2 -1
- package/dist/index.js +43927 -8544
- package/dist/index.js.LICENSE.txt +7 -0
- package/dist/lib/DllReferencePlugin.d.ts +1 -1
- 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 +248 -101
- package/dist/rspack.wasi-browser.js +7 -0
- package/dist/sharing/CollectSharedEntryPlugin.d.ts +22 -0
- package/dist/sharing/ConsumeSharedPlugin.d.ts +17 -4
- package/dist/sharing/IndependentSharedPlugin.d.ts +35 -0
- package/dist/sharing/ProvideSharedPlugin.d.ts +23 -3
- package/dist/sharing/SharePlugin.d.ts +43 -5
- package/dist/sharing/ShareRuntimePlugin.d.ts +1 -1
- package/dist/sharing/SharedContainerPlugin.d.ts +23 -0
- package/dist/sharing/SharedUsedExportsOptimizerPlugin.d.ts +14 -0
- package/dist/sharing/TreeShakingSharedPlugin.d.ts +16 -0
- package/dist/sharing/utils.d.ts +1 -0
- package/dist/stats/StatsFactory.d.ts +1 -1
- package/dist/stats/statsFactoryUtils.d.ts +2 -2
- package/dist/swc.d.ts +2 -2
- 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/createHash.d.ts +1 -1
- package/dist/util/source.d.ts +1 -1
- package/dist/util/supportsColor.d.ts +6 -0
- package/dist/util/targetsVersion.d.ts +2 -0
- package/dist/wasi-worker-browser.mjs +26464 -22498
- package/package.json +6 -7
- package/dist/builtin-loader/index.d.ts +0 -1
- package/dist/rslib-runtime.js +0 -58
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BuiltinPlugin, BuiltinPluginName } from '
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
|
|
2
2
|
import { RspackBuiltinPlugin } from './base';
|
|
3
3
|
export declare class MangleExportsPlugin extends RspackBuiltinPlugin {
|
|
4
4
|
private deterministic;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BuiltinPlugin, BuiltinPluginName } from '
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
|
|
2
2
|
import { RspackBuiltinPlugin } from './base';
|
|
3
3
|
export declare class ModuleConcatenationPlugin extends RspackBuiltinPlugin {
|
|
4
4
|
name: BuiltinPluginName;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BuiltinPlugin, BuiltinPluginName } from '
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
|
|
2
2
|
import { RspackBuiltinPlugin } from './base';
|
|
3
3
|
export declare class NaturalChunkIdsPlugin extends RspackBuiltinPlugin {
|
|
4
4
|
name: BuiltinPluginName;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BuiltinPlugin, BuiltinPluginName } from '
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
|
|
2
2
|
import { RspackBuiltinPlugin } from './base';
|
|
3
3
|
export declare class NaturalModuleIdsPlugin extends RspackBuiltinPlugin {
|
|
4
4
|
name: BuiltinPluginName;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type RawOccurrenceChunkIdsPluginOptions } from '
|
|
1
|
+
import { type RawOccurrenceChunkIdsPluginOptions } from '../binding';
|
|
2
2
|
export declare const OccurrenceChunkIdsPlugin: {
|
|
3
3
|
new (options?: RawOccurrenceChunkIdsPluginOptions | undefined): {
|
|
4
4
|
name: string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { type RawProgressPluginOptions } from '
|
|
2
|
-
export type
|
|
1
|
+
import { type RawProgressPluginHandlerInfo, type RawProgressPluginOptions } from '../binding';
|
|
2
|
+
export type ProgressPluginOptions = Partial<Omit<RawProgressPluginOptions, 'handler'>> | ((percentage: number, msg: string, info: RawProgressPluginHandlerInfo) => void) | undefined;
|
|
3
|
+
export type ProgressPluginHandlerInfo = RawProgressPluginHandlerInfo;
|
|
3
4
|
export declare const ProgressPlugin: {
|
|
4
|
-
new (progress?:
|
|
5
|
+
new (progress?: ProgressPluginOptions): {
|
|
5
6
|
name: string;
|
|
6
|
-
_args: [progress?:
|
|
7
|
+
_args: [progress?: ProgressPluginOptions];
|
|
7
8
|
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
8
9
|
raw(compiler: import("..").Compiler): import("../binding").BuiltinPlugin;
|
|
9
10
|
apply(compiler: import("..").Compiler): void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type JsRsdoctorAsset, type JsRsdoctorAssetPatch, type JsRsdoctorChunk, type JsRsdoctorChunkAssets, type JsRsdoctorChunkGraph, type JsRsdoctorChunkModules, type JsRsdoctorDependency, type JsRsdoctorEntrypoint, type JsRsdoctorEntrypointAssets, type JsRsdoctorExportInfo, type JsRsdoctorModule, type JsRsdoctorModuleGraph, type JsRsdoctorModuleGraphModule, type JsRsdoctorModuleIdsPatch, type JsRsdoctorModuleOriginalSource, type JsRsdoctorModuleSourcesPatch, type JsRsdoctorSideEffect, type JsRsdoctorSourcePosition, type JsRsdoctorSourceRange, type JsRsdoctorStatement, type JsRsdoctorVariable } from '
|
|
1
|
+
import { type JsRsdoctorAsset, type JsRsdoctorAssetPatch, type JsRsdoctorChunk, type JsRsdoctorChunkAssets, type JsRsdoctorChunkGraph, type JsRsdoctorChunkModules, type JsRsdoctorConnectionsOnlyImport, type JsRsdoctorConnectionsOnlyImportConnection, type JsRsdoctorDependency, type JsRsdoctorEntrypoint, type JsRsdoctorEntrypointAssets, type JsRsdoctorExportInfo, type JsRsdoctorModule, type JsRsdoctorModuleGraph, type JsRsdoctorModuleGraphModule, type JsRsdoctorModuleIdsPatch, type JsRsdoctorModuleOriginalSource, type JsRsdoctorModuleSourcesPatch, type JsRsdoctorSideEffect, type JsRsdoctorSourcePosition, type JsRsdoctorSourceRange, type JsRsdoctorStatement, type JsRsdoctorVariable } from '../binding';
|
|
2
2
|
import * as liteTapable from '@rspack/lite-tapable';
|
|
3
3
|
import { type Compilation } from '../Compilation';
|
|
4
4
|
import type { Compiler } from '../Compiler';
|
|
5
5
|
import type { CreatePartialRegisters } from '../taps/types';
|
|
6
6
|
export declare namespace RsdoctorPluginData {
|
|
7
|
-
export type { JsRsdoctorAsset as RsdoctorAsset, JsRsdoctorChunkGraph as RsdoctorChunkGraph, JsRsdoctorModuleGraph as RsdoctorModuleGraph, JsRsdoctorChunk as RsdoctorChunk, JsRsdoctorModule as RsdoctorModule, JsRsdoctorSideEffect as RsdoctorSideEffect, JsRsdoctorExportInfo as RsdoctorExportInfo, JsRsdoctorVariable as RsdoctorVariable, JsRsdoctorDependency as RsdoctorDependency, JsRsdoctorEntrypoint as RsdoctorEntrypoint, JsRsdoctorStatement as RsdoctorStatement, JsRsdoctorSourceRange as RsdoctorSourceRange, JsRsdoctorSourcePosition as RsdoctorSourcePosition, JsRsdoctorModuleGraphModule as RsdoctorModuleGraphModule, JsRsdoctorModuleIdsPatch as RsdoctorModuleIdsPatch, JsRsdoctorModuleOriginalSource as RsdoctorModuleOriginalSource, JsRsdoctorAssetPatch as RsdoctorAssetPatch, JsRsdoctorChunkAssets as RsdoctorChunkAssets, JsRsdoctorEntrypointAssets as RsdoctorEntrypointAssets, JsRsdoctorChunkModules as RsdoctorChunkModules, JsRsdoctorModuleSourcesPatch as RsdoctorModuleSourcesPatch, };
|
|
7
|
+
export type { JsRsdoctorAsset as RsdoctorAsset, JsRsdoctorChunkGraph as RsdoctorChunkGraph, JsRsdoctorModuleGraph as RsdoctorModuleGraph, JsRsdoctorChunk as RsdoctorChunk, JsRsdoctorModule as RsdoctorModule, JsRsdoctorSideEffect as RsdoctorSideEffect, JsRsdoctorExportInfo as RsdoctorExportInfo, JsRsdoctorVariable as RsdoctorVariable, JsRsdoctorConnectionsOnlyImport as RsdoctorConnectionsOnlyImport, JsRsdoctorConnectionsOnlyImportConnection as RsdoctorConnectionsOnlyImportConnection, JsRsdoctorDependency as RsdoctorDependency, JsRsdoctorEntrypoint as RsdoctorEntrypoint, JsRsdoctorStatement as RsdoctorStatement, JsRsdoctorSourceRange as RsdoctorSourceRange, JsRsdoctorSourcePosition as RsdoctorSourcePosition, JsRsdoctorModuleGraphModule as RsdoctorModuleGraphModule, JsRsdoctorModuleIdsPatch as RsdoctorModuleIdsPatch, JsRsdoctorModuleOriginalSource as RsdoctorModuleOriginalSource, JsRsdoctorAssetPatch as RsdoctorAssetPatch, JsRsdoctorChunkAssets as RsdoctorChunkAssets, JsRsdoctorEntrypointAssets as RsdoctorEntrypointAssets, JsRsdoctorChunkModules as RsdoctorChunkModules, JsRsdoctorModuleSourcesPatch as RsdoctorModuleSourcesPatch, };
|
|
8
8
|
}
|
|
9
9
|
export type RsdoctorPluginOptions = {
|
|
10
10
|
moduleGraphFeatures?: boolean | ('graph' | 'ids' | 'sources')[];
|
|
@@ -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 { 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, type RawSplitChunksOptions } from '../binding';
|
|
2
2
|
import type { Compiler } from '../Compiler';
|
|
3
3
|
import type { OptimizationSplitChunksOptions } from '../config';
|
|
4
4
|
import { RspackBuiltinPlugin } from './base';
|
|
@@ -9,3 +9,4 @@ export declare class SplitChunksPlugin extends RspackBuiltinPlugin {
|
|
|
9
9
|
constructor(options: OptimizationSplitChunksOptions);
|
|
10
10
|
raw(compiler: Compiler): BuiltinPlugin;
|
|
11
11
|
}
|
|
12
|
+
export declare function toRawSplitChunksOptions(sc: false | OptimizationSplitChunksOptions, compiler: Compiler): RawSplitChunksOptions | undefined;
|
|
@@ -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 = {
|
|
@@ -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';
|
|
@@ -8,6 +8,7 @@ export declare class WorkerPlugin extends RspackBuiltinPlugin {
|
|
|
8
8
|
private module;
|
|
9
9
|
private workerPublicPath;
|
|
10
10
|
name: BuiltinPluginName;
|
|
11
|
+
affectedHooks: "compilation";
|
|
11
12
|
constructor(chunkLoading: ChunkLoading, wasmLoading: WasmLoading, module: OutputModule, workerPublicPath: WorkerPublicPath);
|
|
12
13
|
raw(compiler: Compiler): BuiltinPlugin;
|
|
13
14
|
}
|
|
@@ -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';
|
|
@@ -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';
|
|
@@ -28,6 +28,7 @@ export * from './EnableWasmLoadingPlugin';
|
|
|
28
28
|
export * from './EnsureChunkConditionsPlugin';
|
|
29
29
|
export * from './EntryPlugin';
|
|
30
30
|
export * from './EsmLibraryPlugin';
|
|
31
|
+
export * from './EsmNodeTargetPlugin';
|
|
31
32
|
export * from './EvalDevToolModulePlugin';
|
|
32
33
|
export * from './EvalSourceMapDevToolPlugin';
|
|
33
34
|
export * from './ExternalsPlugin';
|
|
@@ -73,6 +74,7 @@ export * from './RslibPlugin';
|
|
|
73
74
|
export * from './RstestPlugin';
|
|
74
75
|
export * from './RuntimeChunkPlugin';
|
|
75
76
|
export * from './RuntimePlugin';
|
|
77
|
+
export { rsc } from './rsc';
|
|
76
78
|
export * from './SideEffectsFlagPlugin';
|
|
77
79
|
export * from './SizeLimitsPlugin';
|
|
78
80
|
export * from './SourceMapDevToolPlugin';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Compiler, MultiCompiler } from '../..';
|
|
2
|
-
import type {
|
|
3
|
-
export declare const LAZY_COMPILATION_PREFIX = "/lazy
|
|
2
|
+
import type { DevServerMiddlewareHandler } from '../../config/devServer';
|
|
3
|
+
export declare const LAZY_COMPILATION_PREFIX = "/_rspack/lazy/trigger";
|
|
4
4
|
/**
|
|
5
5
|
* Create a middleware that handles lazy compilation requests from the client.
|
|
6
6
|
* This function returns an Express-style middleware that listens for
|
|
@@ -9,4 +9,4 @@ export declare const LAZY_COMPILATION_PREFIX = "/lazy-compilation-using-";
|
|
|
9
9
|
* Use this middleware when integrating lazy compilation into a
|
|
10
10
|
* custom development server instead of relying on the built-in server.
|
|
11
11
|
*/
|
|
12
|
-
export declare const lazyCompilationMiddleware: (compiler: Compiler | MultiCompiler) =>
|
|
12
|
+
export declare const lazyCompilationMiddleware: (compiler: Compiler | MultiCompiler) => DevServerMiddlewareHandler;
|
|
@@ -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,39 @@
|
|
|
1
|
+
import type binding from '../../binding';
|
|
2
|
+
import type { Compiler } from '../..';
|
|
3
|
+
import { RspackBuiltinPlugin } from '../base';
|
|
4
|
+
import { type Coordinator } from './Coordinator';
|
|
5
|
+
/** Manifest export entry (server/client actions, module refs). */
|
|
6
|
+
export interface RscManifestExport {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
chunks: string[];
|
|
10
|
+
async?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** Map of export name to manifest export. */
|
|
13
|
+
export type RscManifestNode = Record<string, RscManifestExport>;
|
|
14
|
+
/** Module loading config (prefix, crossOrigin). */
|
|
15
|
+
export interface RscModuleLoading {
|
|
16
|
+
prefix: string;
|
|
17
|
+
crossOrigin?: 'use-credentials' | '';
|
|
18
|
+
}
|
|
19
|
+
export interface RscManifestPerEntry {
|
|
20
|
+
serverManifest: Record<string, RscManifestExport>;
|
|
21
|
+
clientManifest: Record<string, RscManifestExport>;
|
|
22
|
+
serverConsumerModuleMap: Record<string, RscManifestNode>;
|
|
23
|
+
moduleLoading: RscModuleLoading;
|
|
24
|
+
entryCssFiles: Record<string, string[]>;
|
|
25
|
+
entryJsFiles: string[];
|
|
26
|
+
}
|
|
27
|
+
/** Full RSC manifest (all entries) passed to onManifest. Map from entry name to per-entry manifest. */
|
|
28
|
+
export type RscManifest = Record<string, RscManifestPerEntry>;
|
|
29
|
+
export type RscServerPluginOptions = {
|
|
30
|
+
coordinator: Coordinator;
|
|
31
|
+
onServerComponentChanges?: () => Promise<void>;
|
|
32
|
+
onManifest?: (manifest: RscManifest) => void | Promise<void>;
|
|
33
|
+
};
|
|
34
|
+
export declare class RscServerPlugin extends RspackBuiltinPlugin {
|
|
35
|
+
#private;
|
|
36
|
+
name: string;
|
|
37
|
+
constructor(options: RscServerPluginOptions);
|
|
38
|
+
raw(compiler: Compiler): binding.BuiltinPlugin;
|
|
39
|
+
}
|
|
@@ -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 {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare function checkNodeVersion(): void;
|
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;
|