@rspack-canary/browser 1.7.0-canary-e20de023-20251223174329 → 1.7.0-canary-4941195f-20251224083309
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/Compiler.d.ts +1 -3
- package/dist/builtin-loader/swc/types.d.ts +4 -6
- package/dist/builtin-plugin/{CaseSensitivePlugin.d.ts → WarnCaseSensitiveModulesPlugin.d.ts} +1 -1
- package/dist/builtin-plugin/index.d.ts +5 -1
- package/dist/builtin-plugin/rsc/Coordinator.d.ts +8 -0
- package/dist/builtin-plugin/rsc/RscClientPlugin.d.ts +10 -0
- package/dist/builtin-plugin/rsc/RscServerPlugin.d.ts +10 -0
- package/dist/builtin-plugin/rsc/index.d.ts +19 -0
- package/dist/config/defaults.d.ts +1 -10
- package/dist/config/target.d.ts +6 -6
- package/dist/config/types.d.ts +0 -1
- package/dist/exports.d.ts +5 -7
- package/dist/index.mjs +304 -87
- package/dist/napi-binding.d.ts +12 -12
- package/dist/rspack.d.ts +0 -9
- package/dist/rspack.wasi-browser.js +1 -0
- package/dist/rspack.wasm32-wasi.wasm +0 -0
- package/dist/util/index.d.ts +0 -1
- package/package.json +1 -1
package/dist/Compiler.d.ts
CHANGED
|
@@ -16,7 +16,6 @@ import type { CompilationParams } from "./Compilation";
|
|
|
16
16
|
import { Compilation } from "./Compilation";
|
|
17
17
|
import { ContextModuleFactory } from "./ContextModuleFactory";
|
|
18
18
|
import type { EntryNormalized, OutputNormalized, RspackOptionsNormalized, RspackPluginInstance } from "./config";
|
|
19
|
-
import type { PlatformTargetProperties } from "./config/target";
|
|
20
19
|
import type { FileSystemInfoEntry } from "./FileSystemInfo";
|
|
21
20
|
import { rspack } from "./index";
|
|
22
21
|
import Cache from "./lib/Cache";
|
|
@@ -79,6 +78,7 @@ export type CompilerHooks = {
|
|
|
79
78
|
entryOption: liteTapable.SyncBailHook<[string, EntryNormalized], any>;
|
|
80
79
|
additionalPass: liteTapable.AsyncSeriesHook<[]>;
|
|
81
80
|
};
|
|
81
|
+
export declare const GET_COMPILER_ID: unique symbol;
|
|
82
82
|
declare class Compiler {
|
|
83
83
|
#private;
|
|
84
84
|
hooks: CompilerHooks;
|
|
@@ -127,8 +127,6 @@ declare class Compiler {
|
|
|
127
127
|
get managedPaths(): never;
|
|
128
128
|
get immutablePaths(): never;
|
|
129
129
|
get _lastCompilation(): Compilation | undefined;
|
|
130
|
-
get platform(): PlatformTargetProperties;
|
|
131
|
-
set platform(platform: PlatformTargetProperties);
|
|
132
130
|
/**
|
|
133
131
|
* Note: This is not a webpack public API, maybe removed in future.
|
|
134
132
|
* @internal
|
|
@@ -10,11 +10,6 @@ export type SwcLoaderTsParserConfig = TsParserConfig;
|
|
|
10
10
|
export type SwcLoaderTransformConfig = TransformConfig;
|
|
11
11
|
export type SwcLoaderOptions = Config & {
|
|
12
12
|
isModule?: boolean | "unknown";
|
|
13
|
-
/**
|
|
14
|
-
* Collects information from TypeScript's AST for consumption by subsequent Rspack processes,
|
|
15
|
-
* providing better TypeScript development experience and smaller output bundle size.
|
|
16
|
-
*/
|
|
17
|
-
collectTypeScriptInfo?: CollectTypeScriptInfoOptions;
|
|
18
13
|
/**
|
|
19
14
|
* Experimental features provided by Rspack.
|
|
20
15
|
* @experimental
|
|
@@ -22,11 +17,14 @@ export type SwcLoaderOptions = Config & {
|
|
|
22
17
|
rspackExperiments?: {
|
|
23
18
|
import?: PluginImportOptions;
|
|
24
19
|
/**
|
|
25
|
-
* @deprecated Use top-level `collectTypeScriptInfo` instead.
|
|
26
20
|
* Collects information from TypeScript's AST for consumption by subsequent Rspack processes,
|
|
27
21
|
* providing better TypeScript development experience and smaller output bundle size.
|
|
28
22
|
*/
|
|
29
23
|
collectTypeScriptInfo?: CollectTypeScriptInfoOptions;
|
|
24
|
+
/**
|
|
25
|
+
* Enable React Server Components support.
|
|
26
|
+
*/
|
|
27
|
+
reactServerComponents?: boolean;
|
|
30
28
|
};
|
|
31
29
|
};
|
|
32
30
|
export interface TerserCompressOptions {
|
|
@@ -5,7 +5,6 @@ export * from "./AsyncWebAssemblyModulesPlugin";
|
|
|
5
5
|
export * from "./BannerPlugin";
|
|
6
6
|
export * from "./BundlerInfoRspackPlugin";
|
|
7
7
|
export { createNativePlugin, RspackBuiltinPlugin } from "./base";
|
|
8
|
-
export * from "./CaseSensitivePlugin";
|
|
9
8
|
export * from "./ChunkPrefetchPreloadPlugin";
|
|
10
9
|
export * from "./CircularDependencyRspackPlugin";
|
|
11
10
|
export * from "./CommonJsChunkFormatPlugin";
|
|
@@ -73,6 +72,10 @@ export * from "./RslibPlugin";
|
|
|
73
72
|
export * from "./RstestPlugin";
|
|
74
73
|
export * from "./RuntimeChunkPlugin";
|
|
75
74
|
export * from "./RuntimePlugin";
|
|
75
|
+
export { createRscPlugins, RSC_LAYERS_NAMES } from "./rsc";
|
|
76
|
+
export * from "./rsc/Coordinator";
|
|
77
|
+
export * from "./rsc/RscClientPlugin";
|
|
78
|
+
export * from "./rsc/RscServerPlugin";
|
|
76
79
|
export * from "./SideEffectsFlagPlugin";
|
|
77
80
|
export * from "./SizeLimitsPlugin";
|
|
78
81
|
export * from "./SourceMapDevToolPlugin";
|
|
@@ -80,5 +83,6 @@ export * from "./SplitChunksPlugin";
|
|
|
80
83
|
export * from "./SubresourceIntegrityPlugin";
|
|
81
84
|
export * from "./SwcJsMinimizerPlugin";
|
|
82
85
|
export * from "./URLPlugin";
|
|
86
|
+
export * from "./WarnCaseSensitiveModulesPlugin";
|
|
83
87
|
export * from "./WebWorkerTemplatePlugin";
|
|
84
88
|
export * from "./WorkerPlugin";
|
|
@@ -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,10 @@
|
|
|
1
|
+
import type binding from "../../binding";
|
|
2
|
+
import type { Compiler } from "../..";
|
|
3
|
+
import { RspackBuiltinPlugin } from "../base";
|
|
4
|
+
import { type Coordinator } from "./Coordinator";
|
|
5
|
+
export declare class RscClientPlugin extends RspackBuiltinPlugin {
|
|
6
|
+
#private;
|
|
7
|
+
name: string;
|
|
8
|
+
constructor(coordinator: Coordinator);
|
|
9
|
+
raw(compiler: Compiler): binding.BuiltinPlugin;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type binding from "../../binding";
|
|
2
|
+
import type { Compiler } from "../..";
|
|
3
|
+
import { RspackBuiltinPlugin } from "../base";
|
|
4
|
+
import { type Coordinator } from "./Coordinator";
|
|
5
|
+
export declare class RscServerPlugin extends RspackBuiltinPlugin {
|
|
6
|
+
#private;
|
|
7
|
+
name: string;
|
|
8
|
+
constructor(coordinator: Coordinator);
|
|
9
|
+
raw(compiler: Compiler): binding.BuiltinPlugin;
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { RspackPluginInstance } from "../..";
|
|
2
|
+
export declare function createRscPlugins(): {
|
|
3
|
+
ServerPlugin: RspackPluginInstance;
|
|
4
|
+
ClientPlugin: RspackPluginInstance;
|
|
5
|
+
};
|
|
6
|
+
export declare const RSC_LAYERS_NAMES: {
|
|
7
|
+
/**
|
|
8
|
+
* The layer for server-only runtime and picking up `react-server` export conditions.
|
|
9
|
+
*/
|
|
10
|
+
REACT_SERVER_COMPONENTS: string;
|
|
11
|
+
/**
|
|
12
|
+
* Server Side Rendering layer for app.
|
|
13
|
+
*/
|
|
14
|
+
SERVER_SIDE_RENDERING: string;
|
|
15
|
+
/**
|
|
16
|
+
* The browser client bundle layer for actions.
|
|
17
|
+
*/
|
|
18
|
+
ACTION_BROWSER: string;
|
|
19
|
+
};
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import type { RspackOptionsNormalized } from "./normalization";
|
|
2
|
-
export declare const applyRspackOptionsDefaults: (options: RspackOptionsNormalized) =>
|
|
3
|
-
platform: false | {
|
|
4
|
-
web: boolean | null | undefined;
|
|
5
|
-
browser: boolean | null | undefined;
|
|
6
|
-
webworker: boolean | null | undefined;
|
|
7
|
-
node: boolean | null | undefined;
|
|
8
|
-
nwjs: boolean | null | undefined;
|
|
9
|
-
electron: boolean | null | undefined;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
2
|
+
export declare const applyRspackOptionsDefaults: (options: RspackOptionsNormalized) => void;
|
|
12
3
|
export declare const applyRspackOptionsBaseDefaults: (options: RspackOptionsNormalized) => void;
|
|
13
4
|
export declare const getPnpDefault: () => boolean;
|
package/dist/config/target.d.ts
CHANGED
|
@@ -5,17 +5,17 @@
|
|
|
5
5
|
export declare const getDefaultTarget: (context: string) => "browserslist" | "web";
|
|
6
6
|
export type PlatformTargetProperties = {
|
|
7
7
|
/** web platform, importing of http(s) and std: is available */
|
|
8
|
-
web
|
|
8
|
+
web: boolean | null;
|
|
9
9
|
/** browser platform, running in a normal web browser */
|
|
10
|
-
browser
|
|
10
|
+
browser: boolean | null;
|
|
11
11
|
/** (Web)Worker platform, running in a web/shared/service worker */
|
|
12
|
-
webworker
|
|
12
|
+
webworker: boolean | null;
|
|
13
13
|
/** node platform, require of node built-in modules is available */
|
|
14
|
-
node
|
|
14
|
+
node: boolean | null;
|
|
15
15
|
/** nwjs platform, require of legacy nw.gui is available */
|
|
16
|
-
nwjs
|
|
16
|
+
nwjs: boolean | null;
|
|
17
17
|
/** electron platform, require of some electron built-in modules is available */
|
|
18
|
-
electron
|
|
18
|
+
electron: boolean | null;
|
|
19
19
|
};
|
|
20
20
|
export type ElectronContextTargetProperties = {
|
|
21
21
|
/** in main context */
|
package/dist/config/types.d.ts
CHANGED
package/dist/exports.d.ts
CHANGED
|
@@ -47,11 +47,7 @@ export declare const util: {
|
|
|
47
47
|
cleverMerge: <First, Second>(first: First, second: Second) => First | Second | (First & Second);
|
|
48
48
|
};
|
|
49
49
|
export type { BannerPluginArgument, DefinePluginOptions, EntryOptions, ProgressPluginArgument, ProvidePluginOptions } from "./builtin-plugin";
|
|
50
|
-
export { BannerPlugin,
|
|
51
|
-
/**
|
|
52
|
-
* @deprecated Use `rspack.CaseSensitivePlugin` instead
|
|
53
|
-
*/
|
|
54
|
-
CaseSensitivePlugin as WarnCaseSensitiveModulesPlugin, DefinePlugin, DynamicEntryPlugin, EntryPlugin, ExternalsPlugin, HotModuleReplacementPlugin, IgnorePlugin, type IgnorePluginOptions, NoEmitOnErrorsPlugin, ProgressPlugin, ProvidePlugin, RuntimePlugin } from "./builtin-plugin";
|
|
50
|
+
export { BannerPlugin, DefinePlugin, DynamicEntryPlugin, EntryPlugin, ExternalsPlugin, HotModuleReplacementPlugin, IgnorePlugin, type IgnorePluginOptions, NoEmitOnErrorsPlugin, ProgressPlugin, ProvidePlugin, RuntimePlugin, WarnCaseSensitiveModulesPlugin } from "./builtin-plugin";
|
|
55
51
|
export { DllPlugin, type DllPluginOptions } from "./lib/DllPlugin";
|
|
56
52
|
export { DllReferencePlugin, type DllReferencePluginOptions, type DllReferencePluginOptionsContent, type DllReferencePluginOptionsManifest, type DllReferencePluginOptionsSourceType } from "./lib/DllReferencePlugin";
|
|
57
53
|
export { default as EntryOptionPlugin } from "./lib/EntryOptionPlugin";
|
|
@@ -59,7 +55,7 @@ export { EnvironmentPlugin } from "./lib/EnvironmentPlugin";
|
|
|
59
55
|
export { LoaderOptionsPlugin } from "./lib/LoaderOptionsPlugin";
|
|
60
56
|
export { LoaderTargetPlugin } from "./lib/LoaderTargetPlugin";
|
|
61
57
|
export type { OutputFileSystem, WatchFileSystem } from "./util/fs";
|
|
62
|
-
import { EsmLibraryPlugin, FetchCompileAsyncWasmPlugin, lazyCompilationMiddleware, SubresourceIntegrityPlugin } from "./builtin-plugin";
|
|
58
|
+
import { createRscPlugins, EsmLibraryPlugin, FetchCompileAsyncWasmPlugin, lazyCompilationMiddleware, RSC_LAYERS_NAMES, SubresourceIntegrityPlugin } from "./builtin-plugin";
|
|
63
59
|
export { SubresourceIntegrityPlugin };
|
|
64
60
|
interface Web {
|
|
65
61
|
FetchCompileAsyncWasmPlugin: typeof FetchCompileAsyncWasmPlugin;
|
|
@@ -136,7 +132,7 @@ export declare const sharing: {
|
|
|
136
132
|
export type { FeatureOptions as LightningcssFeatureOptions, LoaderOptions as LightningcssLoaderOptions } from "./builtin-loader/lightningcss/index";
|
|
137
133
|
export type { SwcLoaderEnvConfig, SwcLoaderEsParserConfig, SwcLoaderJscConfig, SwcLoaderModuleConfig, SwcLoaderOptions, SwcLoaderParserConfig, SwcLoaderTransformConfig, SwcLoaderTsParserConfig } from "./builtin-loader/swc/index";
|
|
138
134
|
export type { CircularDependencyRspackPluginOptions, CopyRspackPluginOptions, CssExtractRspackLoaderOptions, CssExtractRspackPluginOptions, EvalDevToolModulePluginOptions, HtmlRspackPluginOptions, LightningCssMinimizerRspackPluginOptions, RsdoctorPluginData, RsdoctorPluginHooks, SourceMapDevToolPluginOptions, SubresourceIntegrityPluginOptions, SwcJsMinimizerRspackPluginOptions } from "./builtin-plugin";
|
|
139
|
-
export { CircularDependencyRspackPlugin, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, HtmlRspackPlugin, LightningCssMinimizerRspackPlugin, NormalModuleReplacementPlugin, SourceMapDevToolPlugin, SwcJsMinimizerRspackPlugin } from "./builtin-plugin";
|
|
135
|
+
export { CircularDependencyRspackPlugin, ContextReplacementPlugin, Coordinator, CopyRspackPlugin, CssExtractRspackPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, HtmlRspackPlugin, LightningCssMinimizerRspackPlugin, NormalModuleReplacementPlugin, RscClientPlugin, RscServerPlugin, SourceMapDevToolPlugin, SwcJsMinimizerRspackPlugin } from "./builtin-plugin";
|
|
140
136
|
import { EnforceExtension, ResolverFactory, async as resolveAsync, sync as resolveSync } from "./binding";
|
|
141
137
|
import { createNativePlugin } from "./builtin-plugin";
|
|
142
138
|
import { minify, minifySync, transform, transformSync } from "./swc";
|
|
@@ -174,5 +170,7 @@ interface Experiments {
|
|
|
174
170
|
CssChunkingPlugin: typeof CssChunkingPlugin;
|
|
175
171
|
createNativePlugin: typeof createNativePlugin;
|
|
176
172
|
VirtualModulesPlugin: typeof VirtualModulesPlugin;
|
|
173
|
+
createRscPlugins: typeof createRscPlugins;
|
|
174
|
+
RSC_LAYERS_NAMES: typeof RSC_LAYERS_NAMES;
|
|
177
175
|
}
|
|
178
176
|
export declare const experiments: Experiments;
|
package/dist/index.mjs
CHANGED
|
@@ -50562,13 +50562,13 @@ __webpack_require__.r(exports_namespaceObject);
|
|
|
50562
50562
|
__webpack_require__.d(exports_namespaceObject, {
|
|
50563
50563
|
AsyncDependenciesBlock: ()=>external_rspack_wasi_browser_js_.AsyncDependenciesBlock,
|
|
50564
50564
|
BannerPlugin: ()=>BannerPlugin,
|
|
50565
|
-
CaseSensitivePlugin: ()=>CaseSensitivePlugin,
|
|
50566
50565
|
CircularDependencyRspackPlugin: ()=>CircularDependencyRspackPlugin,
|
|
50567
50566
|
Compilation: ()=>Compilation,
|
|
50568
50567
|
Compiler: ()=>Compiler,
|
|
50569
50568
|
ConcatenatedModule: ()=>external_rspack_wasi_browser_js_.ConcatenatedModule,
|
|
50570
50569
|
ContextModule: ()=>external_rspack_wasi_browser_js_.ContextModule,
|
|
50571
50570
|
ContextReplacementPlugin: ()=>ContextReplacementPlugin,
|
|
50571
|
+
Coordinator: ()=>Coordinator,
|
|
50572
50572
|
CopyRspackPlugin: ()=>CopyRspackPlugin,
|
|
50573
50573
|
CssExtractRspackPlugin: ()=>CssExtractRspackPlugin,
|
|
50574
50574
|
DefinePlugin: ()=>DefinePlugin,
|
|
@@ -50599,6 +50599,8 @@ __webpack_require__.d(exports_namespaceObject, {
|
|
|
50599
50599
|
NormalModuleReplacementPlugin: ()=>NormalModuleReplacementPlugin,
|
|
50600
50600
|
ProgressPlugin: ()=>ProgressPlugin,
|
|
50601
50601
|
ProvidePlugin: ()=>ProvidePlugin,
|
|
50602
|
+
RscClientPlugin: ()=>RscClientPlugin,
|
|
50603
|
+
RscServerPlugin: ()=>RscServerPlugin,
|
|
50602
50604
|
RspackOptionsApply: ()=>RspackOptionsApply,
|
|
50603
50605
|
RuntimeGlobals: ()=>DefaultRuntimeGlobals,
|
|
50604
50606
|
RuntimeModule: ()=>RuntimeModule,
|
|
@@ -50610,7 +50612,7 @@ __webpack_require__.d(exports_namespaceObject, {
|
|
|
50610
50612
|
SwcJsMinimizerRspackPlugin: ()=>SwcJsMinimizerRspackPlugin,
|
|
50611
50613
|
Template: ()=>Template,
|
|
50612
50614
|
ValidationError: ()=>ValidationError,
|
|
50613
|
-
WarnCaseSensitiveModulesPlugin: ()=>
|
|
50615
|
+
WarnCaseSensitiveModulesPlugin: ()=>WarnCaseSensitiveModulesPlugin,
|
|
50614
50616
|
WebpackError: ()=>exports_WebpackError,
|
|
50615
50617
|
WebpackOptionsApply: ()=>RspackOptionsApply,
|
|
50616
50618
|
config: ()=>exports_config,
|
|
@@ -52991,7 +52993,6 @@ const BundlerInfoRspackPlugin = base_create(external_rspack_wasi_browser_js_.Bui
|
|
|
52991
52993
|
bundler: options.bundler || "rspack",
|
|
52992
52994
|
force: options.force ?? true
|
|
52993
52995
|
}));
|
|
52994
|
-
const CaseSensitivePlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.CaseSensitivePlugin, ()=>{}, "compilation");
|
|
52995
52996
|
const ChunkPrefetchPreloadPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.ChunkPrefetchPreloadPlugin, ()=>{});
|
|
52996
52997
|
function CircularDependencyRspackPlugin_define_property(obj, key, value) {
|
|
52997
52998
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
@@ -53500,16 +53501,10 @@ function stringifyLoaderObject(o) {
|
|
|
53500
53501
|
return o.path + o.query + o.fragment;
|
|
53501
53502
|
}
|
|
53502
53503
|
const unsupported = (name, issue)=>{
|
|
53503
|
-
let s = `${name} is not supported by
|
|
53504
|
-
if (issue) s += `
|
|
53504
|
+
let s = `${name} is not supported by rspack.`;
|
|
53505
|
+
if (issue) s += ` Please refer to issue ${issue} for more information.`;
|
|
53505
53506
|
throw new Error(s);
|
|
53506
53507
|
};
|
|
53507
|
-
const warnedMessages = new Set();
|
|
53508
|
-
function deprecate(message) {
|
|
53509
|
-
if (warnedMessages.has(message)) return;
|
|
53510
|
-
warnedMessages.add(message);
|
|
53511
|
-
console.warn(`[Rspack Deprecation] ${message}`);
|
|
53512
|
-
}
|
|
53513
53508
|
const WINDOWS_ABS_PATH_REGEXP = /^[a-zA-Z]:[\\/]/;
|
|
53514
53509
|
const SEGMENTS_SPLIT_REGEXP = /([|!])/;
|
|
53515
53510
|
const WINDOWS_PATH_SEPARATOR_REGEXP = /\\/g;
|
|
@@ -55288,15 +55283,10 @@ const getSwcLoaderOptions = (options, _)=>{
|
|
|
55288
55283
|
options.jsc ??= {};
|
|
55289
55284
|
options.jsc.experimental ??= {};
|
|
55290
55285
|
options.jsc.experimental.disableAllLints ??= true;
|
|
55291
|
-
if (options.collectTypeScriptInfo) options.collectTypeScriptInfo = resolveCollectTypeScriptInfo(options.collectTypeScriptInfo);
|
|
55292
55286
|
const { rspackExperiments } = options;
|
|
55293
55287
|
if (rspackExperiments) {
|
|
55294
55288
|
if (rspackExperiments.import || rspackExperiments.pluginImport) rspackExperiments.import = resolvePluginImport(rspackExperiments.import || rspackExperiments.pluginImport);
|
|
55295
|
-
if (rspackExperiments.collectTypeScriptInfo)
|
|
55296
|
-
deprecate("`rspackExperiments.collectTypeScriptInfo` is deprecated and will be removed in Rspack v2.0. Use top-level `collectTypeScriptInfo` instead.");
|
|
55297
|
-
if (!options.collectTypeScriptInfo) options.collectTypeScriptInfo = resolveCollectTypeScriptInfo(rspackExperiments.collectTypeScriptInfo);
|
|
55298
|
-
delete rspackExperiments.collectTypeScriptInfo;
|
|
55299
|
-
}
|
|
55289
|
+
if (rspackExperiments.collectTypeScriptInfo) rspackExperiments.collectTypeScriptInfo = resolveCollectTypeScriptInfo(rspackExperiments.collectTypeScriptInfo);
|
|
55300
55290
|
}
|
|
55301
55291
|
}
|
|
55302
55292
|
return options;
|
|
@@ -56368,9 +56358,23 @@ const lazyCompilationMiddleware = (compiler)=>{
|
|
|
56368
56358
|
if (compiler instanceof MultiCompiler) {
|
|
56369
56359
|
const middlewareByCompiler = new Map();
|
|
56370
56360
|
let i = 0;
|
|
56361
|
+
let isReportDeprecatedWarned = false;
|
|
56362
|
+
let isReportRepeatWarned = false;
|
|
56371
56363
|
for (const c of compiler.compilers){
|
|
56372
|
-
if (c.options.experiments.lazyCompilation)
|
|
56373
|
-
|
|
56364
|
+
if (c.options.experiments.lazyCompilation) {
|
|
56365
|
+
if (c.name) console.warn(`The 'experiments.lazyCompilation' option in compiler named '${c.name}' is deprecated, please use the Configuration top level 'lazyCompilation' instead.`);
|
|
56366
|
+
else if (!isReportDeprecatedWarned) {
|
|
56367
|
+
console.warn(DEPRECATED_LAZY_COMPILATION_OPTIONS_WARN);
|
|
56368
|
+
isReportDeprecatedWarned = true;
|
|
56369
|
+
}
|
|
56370
|
+
}
|
|
56371
|
+
if (c.options.lazyCompilation && c.options.experiments.lazyCompilation) {
|
|
56372
|
+
if (c.name) console.warn(`The top-level 'lazyCompilation' option in compiler named '${c.name}' will override the 'experiments.lazyCompilation' option.`);
|
|
56373
|
+
else if (!isReportRepeatWarned) {
|
|
56374
|
+
console.warn(REPEAT_LAZY_COMPILATION_OPTIONS_WARN);
|
|
56375
|
+
isReportRepeatWarned = true;
|
|
56376
|
+
}
|
|
56377
|
+
}
|
|
56374
56378
|
if (!c.options.lazyCompilation && !c.options.experiments.lazyCompilation) continue;
|
|
56375
56379
|
const options = {
|
|
56376
56380
|
...c.options.experiments.lazyCompilation,
|
|
@@ -56393,8 +56397,8 @@ const lazyCompilationMiddleware = (compiler)=>{
|
|
|
56393
56397
|
};
|
|
56394
56398
|
}
|
|
56395
56399
|
if (compiler.options.experiments.lazyCompilation) {
|
|
56396
|
-
|
|
56397
|
-
if (compiler.options.lazyCompilation)
|
|
56400
|
+
console.warn(DEPRECATED_LAZY_COMPILATION_OPTIONS_WARN);
|
|
56401
|
+
if (compiler.options.lazyCompilation) console.warn(REPEAT_LAZY_COMPILATION_OPTIONS_WARN);
|
|
56398
56402
|
}
|
|
56399
56403
|
if (!compiler.options.lazyCompilation && !compiler.options.experiments.lazyCompilation) return noop;
|
|
56400
56404
|
const activeModules = new Set();
|
|
@@ -56682,6 +56686,238 @@ const createRuntimePluginHooksRegisters = (getCompiler, createTap)=>({
|
|
|
56682
56686
|
};
|
|
56683
56687
|
})
|
|
56684
56688
|
});
|
|
56689
|
+
function Coordinator_check_private_redeclaration(obj, privateCollection) {
|
|
56690
|
+
if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
56691
|
+
}
|
|
56692
|
+
function Coordinator_class_apply_descriptor_get(receiver, descriptor) {
|
|
56693
|
+
if (descriptor.get) return descriptor.get.call(receiver);
|
|
56694
|
+
return descriptor.value;
|
|
56695
|
+
}
|
|
56696
|
+
function Coordinator_class_apply_descriptor_set(receiver, descriptor, value) {
|
|
56697
|
+
if (descriptor.set) descriptor.set.call(receiver, value);
|
|
56698
|
+
else {
|
|
56699
|
+
if (!descriptor.writable) throw new TypeError("attempted to set read only private field");
|
|
56700
|
+
descriptor.value = value;
|
|
56701
|
+
}
|
|
56702
|
+
}
|
|
56703
|
+
function Coordinator_class_extract_field_descriptor(receiver, privateMap, action) {
|
|
56704
|
+
if (!privateMap.has(receiver)) throw new TypeError("attempted to " + action + " private field on non-instance");
|
|
56705
|
+
return privateMap.get(receiver);
|
|
56706
|
+
}
|
|
56707
|
+
function Coordinator_class_private_field_get(receiver, privateMap) {
|
|
56708
|
+
var descriptor = Coordinator_class_extract_field_descriptor(receiver, privateMap, "get");
|
|
56709
|
+
return Coordinator_class_apply_descriptor_get(receiver, descriptor);
|
|
56710
|
+
}
|
|
56711
|
+
function Coordinator_class_private_field_init(obj, privateMap, value) {
|
|
56712
|
+
Coordinator_check_private_redeclaration(obj, privateMap);
|
|
56713
|
+
privateMap.set(obj, value);
|
|
56714
|
+
}
|
|
56715
|
+
function Coordinator_class_private_field_set(receiver, privateMap, value) {
|
|
56716
|
+
var descriptor = Coordinator_class_extract_field_descriptor(receiver, privateMap, "set");
|
|
56717
|
+
Coordinator_class_apply_descriptor_set(receiver, descriptor, value);
|
|
56718
|
+
return value;
|
|
56719
|
+
}
|
|
56720
|
+
const Coordinator_PLUGIN_NAME = "RscPlugin";
|
|
56721
|
+
const GET_OR_INIT_BINDING = Symbol("GET_OR_INIT_BINDING");
|
|
56722
|
+
var _serverCompiler = /*#__PURE__*/ new WeakMap(), _clientCompiler = /*#__PURE__*/ new WeakMap(), _clientLastCompilation = /*#__PURE__*/ new WeakMap(), _binding = /*#__PURE__*/ new WeakMap();
|
|
56723
|
+
class Coordinator {
|
|
56724
|
+
applyServerCompiler(serverCompiler) {
|
|
56725
|
+
Coordinator_class_private_field_set(this, _serverCompiler, serverCompiler);
|
|
56726
|
+
serverCompiler.hooks.done.tap(Coordinator_PLUGIN_NAME, (stats)=>{
|
|
56727
|
+
if (Coordinator_class_private_field_get(this, _clientLastCompilation)) {
|
|
56728
|
+
stats.compilation.fileDependencies.addAll(Coordinator_class_private_field_get(this, _clientLastCompilation).fileDependencies);
|
|
56729
|
+
stats.compilation.contextDependencies.addAll(Coordinator_class_private_field_get(this, _clientLastCompilation).contextDependencies);
|
|
56730
|
+
stats.compilation.missingDependencies.addAll(Coordinator_class_private_field_get(this, _clientLastCompilation).missingDependencies);
|
|
56731
|
+
}
|
|
56732
|
+
});
|
|
56733
|
+
serverCompiler.hooks.watchRun.tap(Coordinator_PLUGIN_NAME, ()=>{
|
|
56734
|
+
Coordinator_class_private_field_get(this, _clientCompiler).watching.invalidateWithChangesAndRemovals(new Set(Coordinator_class_private_field_get(this, _serverCompiler).modifiedFiles), new Set(Coordinator_class_private_field_get(this, _serverCompiler).removedFiles));
|
|
56735
|
+
});
|
|
56736
|
+
}
|
|
56737
|
+
applyClientCompiler(clientCompiler) {
|
|
56738
|
+
Coordinator_class_private_field_set(this, _clientCompiler, clientCompiler);
|
|
56739
|
+
const originalWatch = clientCompiler.watch;
|
|
56740
|
+
clientCompiler.watch = function(watchOptions, handler) {
|
|
56741
|
+
watchOptions.ignored = ()=>true;
|
|
56742
|
+
return originalWatch.call(this, watchOptions, handler);
|
|
56743
|
+
};
|
|
56744
|
+
clientCompiler.hooks.done.tap(Coordinator_PLUGIN_NAME, (stats)=>{
|
|
56745
|
+
Coordinator_class_private_field_set(this, _clientLastCompilation, stats.compilation);
|
|
56746
|
+
});
|
|
56747
|
+
}
|
|
56748
|
+
constructor(){
|
|
56749
|
+
Coordinator_class_private_field_init(this, _serverCompiler, {
|
|
56750
|
+
writable: true,
|
|
56751
|
+
value: void 0
|
|
56752
|
+
});
|
|
56753
|
+
Coordinator_class_private_field_init(this, _clientCompiler, {
|
|
56754
|
+
writable: true,
|
|
56755
|
+
value: void 0
|
|
56756
|
+
});
|
|
56757
|
+
Coordinator_class_private_field_init(this, _clientLastCompilation, {
|
|
56758
|
+
writable: true,
|
|
56759
|
+
value: void 0
|
|
56760
|
+
});
|
|
56761
|
+
Coordinator_class_private_field_init(this, _binding, {
|
|
56762
|
+
writable: true,
|
|
56763
|
+
value: void 0
|
|
56764
|
+
});
|
|
56765
|
+
Object.defineProperty(this, GET_OR_INIT_BINDING, {
|
|
56766
|
+
enumerable: false,
|
|
56767
|
+
configurable: false,
|
|
56768
|
+
writable: false,
|
|
56769
|
+
value: ()=>{
|
|
56770
|
+
if (!Coordinator_class_private_field_get(this, _binding)) Coordinator_class_private_field_set(this, _binding, new external_rspack_wasi_browser_js_.JsCoordinator(()=>{
|
|
56771
|
+
if (!Coordinator_class_private_field_get(this, _serverCompiler)) throw new Error("[RscPlugin] Coordinator.getOrInitBinding() called before the server compiler was attached. Call coordinator.applyServerCompiler(serverCompiler) first.");
|
|
56772
|
+
return Coordinator_class_private_field_get(this, _serverCompiler)[GET_COMPILER_ID]();
|
|
56773
|
+
}));
|
|
56774
|
+
return Coordinator_class_private_field_get(this, _binding);
|
|
56775
|
+
}
|
|
56776
|
+
});
|
|
56777
|
+
}
|
|
56778
|
+
}
|
|
56779
|
+
function RscClientPlugin_check_private_redeclaration(obj, privateCollection) {
|
|
56780
|
+
if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
56781
|
+
}
|
|
56782
|
+
function RscClientPlugin_class_apply_descriptor_get(receiver, descriptor) {
|
|
56783
|
+
if (descriptor.get) return descriptor.get.call(receiver);
|
|
56784
|
+
return descriptor.value;
|
|
56785
|
+
}
|
|
56786
|
+
function RscClientPlugin_class_apply_descriptor_set(receiver, descriptor, value) {
|
|
56787
|
+
if (descriptor.set) descriptor.set.call(receiver, value);
|
|
56788
|
+
else {
|
|
56789
|
+
if (!descriptor.writable) throw new TypeError("attempted to set read only private field");
|
|
56790
|
+
descriptor.value = value;
|
|
56791
|
+
}
|
|
56792
|
+
}
|
|
56793
|
+
function RscClientPlugin_class_extract_field_descriptor(receiver, privateMap, action) {
|
|
56794
|
+
if (!privateMap.has(receiver)) throw new TypeError("attempted to " + action + " private field on non-instance");
|
|
56795
|
+
return privateMap.get(receiver);
|
|
56796
|
+
}
|
|
56797
|
+
function RscClientPlugin_class_private_field_get(receiver, privateMap) {
|
|
56798
|
+
var descriptor = RscClientPlugin_class_extract_field_descriptor(receiver, privateMap, "get");
|
|
56799
|
+
return RscClientPlugin_class_apply_descriptor_get(receiver, descriptor);
|
|
56800
|
+
}
|
|
56801
|
+
function RscClientPlugin_class_private_field_init(obj, privateMap, value) {
|
|
56802
|
+
RscClientPlugin_check_private_redeclaration(obj, privateMap);
|
|
56803
|
+
privateMap.set(obj, value);
|
|
56804
|
+
}
|
|
56805
|
+
function RscClientPlugin_class_private_field_set(receiver, privateMap, value) {
|
|
56806
|
+
var descriptor = RscClientPlugin_class_extract_field_descriptor(receiver, privateMap, "set");
|
|
56807
|
+
RscClientPlugin_class_apply_descriptor_set(receiver, descriptor, value);
|
|
56808
|
+
return value;
|
|
56809
|
+
}
|
|
56810
|
+
function RscClientPlugin_define_property(obj, key, value) {
|
|
56811
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
56812
|
+
value: value,
|
|
56813
|
+
enumerable: true,
|
|
56814
|
+
configurable: true,
|
|
56815
|
+
writable: true
|
|
56816
|
+
});
|
|
56817
|
+
else obj[key] = value;
|
|
56818
|
+
return obj;
|
|
56819
|
+
}
|
|
56820
|
+
var _coordinator = /*#__PURE__*/ new WeakMap();
|
|
56821
|
+
class RscClientPlugin extends RspackBuiltinPlugin {
|
|
56822
|
+
raw(compiler) {
|
|
56823
|
+
RscClientPlugin_class_private_field_get(this, _coordinator).applyClientCompiler(compiler);
|
|
56824
|
+
return createBuiltinPlugin(this.name, RscClientPlugin_class_private_field_get(this, _coordinator)[GET_OR_INIT_BINDING]());
|
|
56825
|
+
}
|
|
56826
|
+
constructor(coordinator){
|
|
56827
|
+
super(), RscClientPlugin_define_property(this, "name", "RscClientPlugin"), RscClientPlugin_class_private_field_init(this, _coordinator, {
|
|
56828
|
+
writable: true,
|
|
56829
|
+
value: void 0
|
|
56830
|
+
});
|
|
56831
|
+
RscClientPlugin_class_private_field_set(this, _coordinator, coordinator);
|
|
56832
|
+
}
|
|
56833
|
+
}
|
|
56834
|
+
function RscServerPlugin_check_private_redeclaration(obj, privateCollection) {
|
|
56835
|
+
if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
56836
|
+
}
|
|
56837
|
+
function RscServerPlugin_class_apply_descriptor_get(receiver, descriptor) {
|
|
56838
|
+
if (descriptor.get) return descriptor.get.call(receiver);
|
|
56839
|
+
return descriptor.value;
|
|
56840
|
+
}
|
|
56841
|
+
function RscServerPlugin_class_apply_descriptor_set(receiver, descriptor, value) {
|
|
56842
|
+
if (descriptor.set) descriptor.set.call(receiver, value);
|
|
56843
|
+
else {
|
|
56844
|
+
if (!descriptor.writable) throw new TypeError("attempted to set read only private field");
|
|
56845
|
+
descriptor.value = value;
|
|
56846
|
+
}
|
|
56847
|
+
}
|
|
56848
|
+
function RscServerPlugin_class_extract_field_descriptor(receiver, privateMap, action) {
|
|
56849
|
+
if (!privateMap.has(receiver)) throw new TypeError("attempted to " + action + " private field on non-instance");
|
|
56850
|
+
return privateMap.get(receiver);
|
|
56851
|
+
}
|
|
56852
|
+
function RscServerPlugin_class_private_field_get(receiver, privateMap) {
|
|
56853
|
+
var descriptor = RscServerPlugin_class_extract_field_descriptor(receiver, privateMap, "get");
|
|
56854
|
+
return RscServerPlugin_class_apply_descriptor_get(receiver, descriptor);
|
|
56855
|
+
}
|
|
56856
|
+
function RscServerPlugin_class_private_field_init(obj, privateMap, value) {
|
|
56857
|
+
RscServerPlugin_check_private_redeclaration(obj, privateMap);
|
|
56858
|
+
privateMap.set(obj, value);
|
|
56859
|
+
}
|
|
56860
|
+
function RscServerPlugin_class_private_field_set(receiver, privateMap, value) {
|
|
56861
|
+
var descriptor = RscServerPlugin_class_extract_field_descriptor(receiver, privateMap, "set");
|
|
56862
|
+
RscServerPlugin_class_apply_descriptor_set(receiver, descriptor, value);
|
|
56863
|
+
return value;
|
|
56864
|
+
}
|
|
56865
|
+
function RscServerPlugin_class_private_method_get(receiver, privateSet, fn) {
|
|
56866
|
+
if (!privateSet.has(receiver)) throw new TypeError("attempted to get private field on non-instance");
|
|
56867
|
+
return fn;
|
|
56868
|
+
}
|
|
56869
|
+
function RscServerPlugin_class_private_method_init(obj, privateSet) {
|
|
56870
|
+
RscServerPlugin_check_private_redeclaration(obj, privateSet);
|
|
56871
|
+
privateSet.add(obj);
|
|
56872
|
+
}
|
|
56873
|
+
function RscServerPlugin_define_property(obj, key, value) {
|
|
56874
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
56875
|
+
value: value,
|
|
56876
|
+
enumerable: true,
|
|
56877
|
+
configurable: true,
|
|
56878
|
+
writable: true
|
|
56879
|
+
});
|
|
56880
|
+
else obj[key] = value;
|
|
56881
|
+
return obj;
|
|
56882
|
+
}
|
|
56883
|
+
var RscServerPlugin_coordinator = /*#__PURE__*/ new WeakMap(), _resolve = /*#__PURE__*/ new WeakSet();
|
|
56884
|
+
class RscServerPlugin extends RspackBuiltinPlugin {
|
|
56885
|
+
raw(compiler) {
|
|
56886
|
+
const bindingOptions = RscServerPlugin_class_private_method_get(this, _resolve, RscServerPlugin_resolve).call(this, compiler);
|
|
56887
|
+
return createBuiltinPlugin(this.name, bindingOptions);
|
|
56888
|
+
}
|
|
56889
|
+
constructor(coordinator){
|
|
56890
|
+
super(), RscServerPlugin_class_private_method_init(this, _resolve), RscServerPlugin_define_property(this, "name", "RscServerPlugin"), RscServerPlugin_class_private_field_init(this, RscServerPlugin_coordinator, {
|
|
56891
|
+
writable: true,
|
|
56892
|
+
value: void 0
|
|
56893
|
+
});
|
|
56894
|
+
RscServerPlugin_class_private_field_set(this, RscServerPlugin_coordinator, coordinator);
|
|
56895
|
+
}
|
|
56896
|
+
}
|
|
56897
|
+
function RscServerPlugin_resolve(serverCompiler) {
|
|
56898
|
+
RscServerPlugin_class_private_field_get(this, RscServerPlugin_coordinator).applyServerCompiler(serverCompiler);
|
|
56899
|
+
return RscServerPlugin_class_private_field_get(this, RscServerPlugin_coordinator)[GET_OR_INIT_BINDING]();
|
|
56900
|
+
}
|
|
56901
|
+
function createRscPlugins() {
|
|
56902
|
+
const coordinator = new Coordinator();
|
|
56903
|
+
return {
|
|
56904
|
+
ServerPlugin: class extends RscServerPlugin {
|
|
56905
|
+
constructor(){
|
|
56906
|
+
super(coordinator);
|
|
56907
|
+
}
|
|
56908
|
+
},
|
|
56909
|
+
ClientPlugin: class extends RscClientPlugin {
|
|
56910
|
+
constructor(){
|
|
56911
|
+
super(coordinator);
|
|
56912
|
+
}
|
|
56913
|
+
}
|
|
56914
|
+
};
|
|
56915
|
+
}
|
|
56916
|
+
const RSC_LAYERS_NAMES = {
|
|
56917
|
+
REACT_SERVER_COMPONENTS: "react-server-components",
|
|
56918
|
+
SERVER_SIDE_RENDERING: "server-side-rendering",
|
|
56919
|
+
ACTION_BROWSER: "action-browser"
|
|
56920
|
+
};
|
|
56685
56921
|
const SideEffectsFlagPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.SideEffectsFlagPlugin, ()=>{}, "compilation");
|
|
56686
56922
|
const SizeLimitsPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.SizeLimitsPlugin, (options)=>{
|
|
56687
56923
|
const hints = false === options.hints ? void 0 : options.hints;
|
|
@@ -57010,6 +57246,7 @@ const SwcJsMinimizerRspackPlugin = base_create(external_rspack_wasi_browser_js_.
|
|
|
57010
57246
|
};
|
|
57011
57247
|
}, "compilation");
|
|
57012
57248
|
const URLPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.URLPlugin, ()=>{}, "compilation");
|
|
57249
|
+
const WarnCaseSensitiveModulesPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.WarnCaseSensitiveModulesPlugin, ()=>{}, "compilation");
|
|
57013
57250
|
function WebWorkerTemplatePlugin_define_property(obj, key, value) {
|
|
57014
57251
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
57015
57252
|
value: value,
|
|
@@ -58165,16 +58402,6 @@ const applyRspackOptionsDefaults = (options)=>{
|
|
|
58165
58402
|
css: options.experiments.css
|
|
58166
58403
|
}), options.resolve);
|
|
58167
58404
|
options.resolveLoader = cleverMerge(getResolveLoaderDefaults(), options.resolveLoader);
|
|
58168
|
-
return {
|
|
58169
|
-
platform: false === targetProperties ? targetProperties : {
|
|
58170
|
-
web: targetProperties.web,
|
|
58171
|
-
browser: targetProperties.browser,
|
|
58172
|
-
webworker: targetProperties.webworker,
|
|
58173
|
-
node: targetProperties.node,
|
|
58174
|
-
nwjs: targetProperties.nwjs,
|
|
58175
|
-
electron: targetProperties.electron
|
|
58176
|
-
}
|
|
58177
|
-
};
|
|
58178
58405
|
};
|
|
58179
58406
|
const applyRspackOptionsBaseDefaults = (options)=>{
|
|
58180
58407
|
F(options, "context", ()=>defaults_process.cwd());
|
|
@@ -58229,7 +58456,7 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
|
58229
58456
|
if ("object" == typeof rspackFuture) {
|
|
58230
58457
|
D(rspackFuture, "bundlerInfo", {});
|
|
58231
58458
|
if ("object" == typeof rspackFuture.bundlerInfo) {
|
|
58232
|
-
D(rspackFuture.bundlerInfo, "version", "1.7.0-canary-
|
|
58459
|
+
D(rspackFuture.bundlerInfo, "version", "1.7.0-canary-4941195f-20251224083309");
|
|
58233
58460
|
D(rspackFuture.bundlerInfo, "bundler", "rspack");
|
|
58234
58461
|
D(rspackFuture.bundlerInfo, "force", !library);
|
|
58235
58462
|
}
|
|
@@ -58947,7 +59174,7 @@ const getNormalizedRspackOptions = (config)=>({
|
|
|
58947
59174
|
main: {}
|
|
58948
59175
|
} : "function" == typeof config.entry ? ((fn)=>()=>Promise.resolve().then(fn).then(getNormalizedEntryStatic))(config.entry) : getNormalizedEntryStatic(config.entry),
|
|
58949
59176
|
output: nestedConfig(config.output, (output)=>{
|
|
58950
|
-
if ("cssHeadDataCompression" in output) deprecate("cssHeadDataCompression is not used now, see https://github.com/web-infra-dev/rspack/pull/8534, this option could be removed in the future");
|
|
59177
|
+
if ("cssHeadDataCompression" in output) util_default().deprecate(()=>{}, "cssHeadDataCompression is not used now, see https://github.com/web-infra-dev/rspack/pull/8534, this option could be removed in the future")();
|
|
58951
59178
|
const { library } = output;
|
|
58952
59179
|
const libraryAsName = library;
|
|
58953
59180
|
const libraryBase = "object" == typeof library && library && !Array.isArray(library) && "type" in library ? library : libraryAsName || output.libraryTarget ? {
|
|
@@ -59098,12 +59325,12 @@ const getNormalizedRspackOptions = (config)=>({
|
|
|
59098
59325
|
...p
|
|
59099
59326
|
]),
|
|
59100
59327
|
experiments: nestedConfig(config.experiments, (experiments)=>{
|
|
59101
|
-
if (experiments.layers) deprecate("`experiments.layers` config
|
|
59102
|
-
if (false === experiments.topLevelAwait) deprecate("`experiments.topLevelAwait` config
|
|
59103
|
-
if (experiments.lazyBarrel) deprecate("`experiments.lazyBarrel` config
|
|
59104
|
-
if (experiments.inlineConst) deprecate("`experiments.inlineConst` config
|
|
59105
|
-
if (experiments.inlineEnum) deprecate("`experiments.inlineEnum` config
|
|
59106
|
-
if (experiments.typeReexportsPresence) deprecate("`experiments.typeReexportsPresence` config
|
|
59328
|
+
if (experiments.layers) util_default().deprecate(()=>{}, "`experiments.layers` config has been deprecated and will be removed in Rspack v2.0. Feature layers will be always enabled. Please remove this option from your Rspack configuration.")();
|
|
59329
|
+
if (false === experiments.topLevelAwait) util_default().deprecate(()=>{}, "`experiments.topLevelAwait` config has been deprecated and will be removed in Rspack v2.0. Top-level await will be always enabled. Please remove this option from your Rspack configuration.")();
|
|
59330
|
+
if (experiments.lazyBarrel) util_default().deprecate(()=>{}, "`experiments.lazyBarrel` config has been deprecated and will be removed in Rspack v2.0. Lazy barrel is already stable and enabled by default. Please remove this option from your Rspack configuration.")();
|
|
59331
|
+
if (experiments.inlineConst) util_default().deprecate(()=>{}, "`experiments.inlineConst` config has been deprecated and will be removed in Rspack v2.0. Inline Const is already stable and enabled by default. Please remove this option from your Rspack configuration.")();
|
|
59332
|
+
if (experiments.inlineEnum) util_default().deprecate(()=>{}, "`experiments.inlineEnum` config has been deprecated and will be removed in Rspack v2.0. Inline Enum is already stable. Please remove this option from your Rspack configuration.")();
|
|
59333
|
+
if (experiments.typeReexportsPresence) util_default().deprecate(()=>{}, "`experiments.typeReexportsPresence` config has been deprecated and will be removed in Rspack v2.0. typeReexportsPresence is already stable. Please remove this option from your Rspack configuration.")();
|
|
59107
59334
|
return {
|
|
59108
59335
|
...experiments,
|
|
59109
59336
|
cache: optionalNestedConfig(experiments.cache, (cache)=>{
|
|
@@ -60298,13 +60525,13 @@ function Resolver_class_private_field_set(receiver, privateMap, value) {
|
|
|
60298
60525
|
Resolver_class_apply_descriptor_set(receiver, descriptor, value);
|
|
60299
60526
|
return value;
|
|
60300
60527
|
}
|
|
60301
|
-
var
|
|
60528
|
+
var Resolver_binding = /*#__PURE__*/ new WeakMap();
|
|
60302
60529
|
class Resolver {
|
|
60303
60530
|
resolveSync(_context, path, request) {
|
|
60304
|
-
return Resolver_class_private_field_get(this,
|
|
60531
|
+
return Resolver_class_private_field_get(this, Resolver_binding).resolveSync(path, request) ?? false;
|
|
60305
60532
|
}
|
|
60306
60533
|
resolve(_context, path, request, resolveContext, callback) {
|
|
60307
|
-
Resolver_class_private_field_get(this,
|
|
60534
|
+
Resolver_class_private_field_get(this, Resolver_binding).resolve(path, request, (error, text)=>{
|
|
60308
60535
|
if (error) return void callback(error);
|
|
60309
60536
|
const req = text ? JSON.parse(text) : void 0;
|
|
60310
60537
|
if (req?.fileDependencies) req.fileDependencies.forEach((file)=>{
|
|
@@ -60317,11 +60544,11 @@ class Resolver {
|
|
|
60317
60544
|
});
|
|
60318
60545
|
}
|
|
60319
60546
|
constructor(binding){
|
|
60320
|
-
Resolver_class_private_field_init(this,
|
|
60547
|
+
Resolver_class_private_field_init(this, Resolver_binding, {
|
|
60321
60548
|
writable: true,
|
|
60322
60549
|
value: void 0
|
|
60323
60550
|
});
|
|
60324
|
-
Resolver_class_private_field_set(this,
|
|
60551
|
+
Resolver_class_private_field_set(this, Resolver_binding, binding);
|
|
60325
60552
|
}
|
|
60326
60553
|
}
|
|
60327
60554
|
function ResolverFactory_check_private_redeclaration(obj, privateCollection) {
|
|
@@ -61498,24 +61725,24 @@ class Watching {
|
|
|
61498
61725
|
compilation.endTime = Date.now();
|
|
61499
61726
|
const cbs = this.callbacks;
|
|
61500
61727
|
this.callbacks = [];
|
|
61501
|
-
const fileDependencies = new Set([
|
|
61502
|
-
...compilation.fileDependencies
|
|
61503
|
-
]);
|
|
61504
|
-
fileDependencies.added = new Set(compilation.__internal__addedFileDependencies);
|
|
61505
|
-
fileDependencies.removed = new Set(compilation.__internal__removedFileDependencies);
|
|
61506
|
-
const contextDependencies = new Set([
|
|
61507
|
-
...compilation.contextDependencies
|
|
61508
|
-
]);
|
|
61509
|
-
contextDependencies.added = new Set(compilation.__internal__addedContextDependencies);
|
|
61510
|
-
contextDependencies.removed = new Set(compilation.__internal__removedContextDependencies);
|
|
61511
|
-
const missingDependencies = new Set([
|
|
61512
|
-
...compilation.missingDependencies
|
|
61513
|
-
]);
|
|
61514
|
-
missingDependencies.added = new Set(compilation.__internal__addedMissingDependencies);
|
|
61515
|
-
missingDependencies.removed = new Set(compilation.__internal__removedMissingDependencies);
|
|
61516
61728
|
this.compiler.hooks.done.callAsync(stats, (err)=>{
|
|
61517
61729
|
if (err) return handleError(err, cbs);
|
|
61518
61730
|
this.handler(null, stats);
|
|
61731
|
+
const fileDependencies = new Set([
|
|
61732
|
+
...compilation.fileDependencies
|
|
61733
|
+
]);
|
|
61734
|
+
fileDependencies.added = new Set(compilation.__internal__addedFileDependencies);
|
|
61735
|
+
fileDependencies.removed = new Set(compilation.__internal__removedFileDependencies);
|
|
61736
|
+
const contextDependencies = new Set([
|
|
61737
|
+
...compilation.contextDependencies
|
|
61738
|
+
]);
|
|
61739
|
+
contextDependencies.added = new Set(compilation.__internal__addedContextDependencies);
|
|
61740
|
+
contextDependencies.removed = new Set(compilation.__internal__removedContextDependencies);
|
|
61741
|
+
const missingDependencies = new Set([
|
|
61742
|
+
...compilation.missingDependencies
|
|
61743
|
+
]);
|
|
61744
|
+
missingDependencies.added = new Set(compilation.__internal__addedMissingDependencies);
|
|
61745
|
+
missingDependencies.removed = new Set(compilation.__internal__removedMissingDependencies);
|
|
61519
61746
|
Watching_process.nextTick(()=>{
|
|
61520
61747
|
if (!Watching_class_private_field_get(this, _closed)) this.watch(fileDependencies, contextDependencies, missingDependencies);
|
|
61521
61748
|
});
|
|
@@ -61721,7 +61948,8 @@ function Compiler_define_property(obj, key, value) {
|
|
|
61721
61948
|
return obj;
|
|
61722
61949
|
}
|
|
61723
61950
|
const COMPILATION_WEAK_MAP = new WeakMap();
|
|
61724
|
-
|
|
61951
|
+
const GET_COMPILER_ID = Symbol("getCompilerId");
|
|
61952
|
+
var _instance = /*#__PURE__*/ new WeakMap(), Compiler_initial = /*#__PURE__*/ new WeakMap(), Compiler_compilation = /*#__PURE__*/ new WeakMap(), _compilationParams = /*#__PURE__*/ new WeakMap(), _builtinPlugins = /*#__PURE__*/ new WeakMap(), _moduleExecutionResultsMap = /*#__PURE__*/ new WeakMap(), _nonSkippableRegisters = /*#__PURE__*/ new WeakMap(), _registers = /*#__PURE__*/ new WeakMap(), _ruleSet = /*#__PURE__*/ new WeakMap(), _build = /*#__PURE__*/ new WeakSet(), _resetThisCompilation = /*#__PURE__*/ new WeakSet(), _newCompilationParams = /*#__PURE__*/ new WeakSet(), _getInstance = /*#__PURE__*/ new WeakSet(), _createHooksRegisters = /*#__PURE__*/ new WeakSet(), _updateNonSkippableRegisters = /*#__PURE__*/ new WeakSet(), _decorateJsTaps = /*#__PURE__*/ new WeakSet(), _createHookRegisterTaps = /*#__PURE__*/ new WeakSet(), _createHookMapRegisterTaps = /*#__PURE__*/ new WeakSet();
|
|
61725
61953
|
class Compiler {
|
|
61726
61954
|
get recordsInputPath() {
|
|
61727
61955
|
return unsupported("Compiler.recordsInputPath");
|
|
@@ -61738,12 +61966,6 @@ class Compiler {
|
|
|
61738
61966
|
get _lastCompilation() {
|
|
61739
61967
|
return Compiler_class_private_field_get(this, Compiler_compilation);
|
|
61740
61968
|
}
|
|
61741
|
-
get platform() {
|
|
61742
|
-
return Compiler_class_private_field_get(this, _platform);
|
|
61743
|
-
}
|
|
61744
|
-
set platform(platform) {
|
|
61745
|
-
Compiler_class_private_field_set(this, _platform, platform);
|
|
61746
|
-
}
|
|
61747
61969
|
get __internal__builtinPlugins() {
|
|
61748
61970
|
return Compiler_class_private_field_get(this, _builtinPlugins);
|
|
61749
61971
|
}
|
|
@@ -62068,10 +62290,6 @@ class Compiler {
|
|
|
62068
62290
|
Compiler_define_property(this, "context", void 0);
|
|
62069
62291
|
Compiler_define_property(this, "cache", void 0);
|
|
62070
62292
|
Compiler_define_property(this, "compilerPath", void 0);
|
|
62071
|
-
Compiler_class_private_field_init(this, _platform, {
|
|
62072
|
-
writable: true,
|
|
62073
|
-
value: void 0
|
|
62074
|
-
});
|
|
62075
62293
|
Compiler_define_property(this, "options", void 0);
|
|
62076
62294
|
Compiler_define_property(this, "unsafeFastDrop", false);
|
|
62077
62295
|
Compiler_define_property(this, "__internal_browser_require", void 0);
|
|
@@ -62190,20 +62408,18 @@ class Compiler {
|
|
|
62190
62408
|
this.running = false;
|
|
62191
62409
|
this.idle = false;
|
|
62192
62410
|
this.watchMode = false;
|
|
62193
|
-
Compiler_class_private_field_set(this, _platform, {
|
|
62194
|
-
web: null,
|
|
62195
|
-
browser: null,
|
|
62196
|
-
webworker: null,
|
|
62197
|
-
node: null,
|
|
62198
|
-
nwjs: null,
|
|
62199
|
-
electron: null
|
|
62200
|
-
});
|
|
62201
62411
|
this.__internal_browser_require = ()=>{
|
|
62202
62412
|
throw new Error("Cannot execute user defined code in browser without `BrowserRequirePlugin`");
|
|
62203
62413
|
};
|
|
62204
62414
|
this.resolverFactory = new ResolverFactory(options.resolve.pnp ?? getPnpDefault(), options.resolve, options.resolveLoader);
|
|
62205
62415
|
new JsLoaderRspackPlugin(this).apply(this);
|
|
62206
62416
|
new ExecuteModulePlugin().apply(this);
|
|
62417
|
+
Object.defineProperty(this, GET_COMPILER_ID, {
|
|
62418
|
+
writable: false,
|
|
62419
|
+
configurable: false,
|
|
62420
|
+
enumerable: false,
|
|
62421
|
+
value: ()=>Compiler_class_private_field_get(this, _instance).getCompilerId()
|
|
62422
|
+
});
|
|
62207
62423
|
}
|
|
62208
62424
|
}
|
|
62209
62425
|
function build(callback) {
|
|
@@ -62244,7 +62460,7 @@ function getInstance(callback) {
|
|
|
62244
62460
|
Compiler_class_private_field_set(this, _registers, Compiler_class_private_method_get(this, _createHooksRegisters, createHooksRegisters).call(this));
|
|
62245
62461
|
const inputFileSystem = this.inputFileSystem && ThreadsafeInputNodeFS.needsBinding(options.experiments.useInputFileSystem) ? ThreadsafeInputNodeFS.__to_binding(this.inputFileSystem) : void 0;
|
|
62246
62462
|
try {
|
|
62247
|
-
Compiler_class_private_field_set(this, _instance, new instanceBinding.JsCompiler(this.compilerPath, rawOptions, Compiler_class_private_field_get(this, _builtinPlugins), Compiler_class_private_field_get(this, _registers), ThreadsafeOutputNodeFS.__to_binding(this.outputFileSystem), this.intermediateFileSystem ? ThreadsafeIntermediateNodeFS.__to_binding(this.intermediateFileSystem) : void 0, inputFileSystem, ResolverFactory.__to_binding(this.resolverFactory), this.unsafeFastDrop
|
|
62463
|
+
Compiler_class_private_field_set(this, _instance, new instanceBinding.JsCompiler(this.compilerPath, rawOptions, Compiler_class_private_field_get(this, _builtinPlugins), Compiler_class_private_field_get(this, _registers), ThreadsafeOutputNodeFS.__to_binding(this.outputFileSystem), this.intermediateFileSystem ? ThreadsafeIntermediateNodeFS.__to_binding(this.intermediateFileSystem) : void 0, inputFileSystem, ResolverFactory.__to_binding(this.resolverFactory), this.unsafeFastDrop));
|
|
62248
62464
|
callback(null, Compiler_class_private_field_get(this, _instance));
|
|
62249
62465
|
} catch (err) {
|
|
62250
62466
|
if (err instanceof Error) delete err.stack;
|
|
@@ -62405,7 +62621,7 @@ class MultiStats {
|
|
|
62405
62621
|
return obj;
|
|
62406
62622
|
});
|
|
62407
62623
|
if (childOptions.version) {
|
|
62408
|
-
obj.rspackVersion = "1.7.0-canary-
|
|
62624
|
+
obj.rspackVersion = "1.7.0-canary-4941195f-20251224083309";
|
|
62409
62625
|
obj.version = "5.75.0";
|
|
62410
62626
|
}
|
|
62411
62627
|
if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join("");
|
|
@@ -63721,7 +63937,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
63721
63937
|
},
|
|
63722
63938
|
version: (object)=>{
|
|
63723
63939
|
object.version = "5.75.0";
|
|
63724
|
-
object.rspackVersion = "1.7.0-canary-
|
|
63940
|
+
object.rspackVersion = "1.7.0-canary-4941195f-20251224083309";
|
|
63725
63941
|
},
|
|
63726
63942
|
env: (object, _compilation, _context, { _env })=>{
|
|
63727
63943
|
object.env = _env;
|
|
@@ -66858,7 +67074,7 @@ function transformSync(source, options) {
|
|
|
66858
67074
|
const _options = JSON.stringify(options || {});
|
|
66859
67075
|
return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
|
|
66860
67076
|
}
|
|
66861
|
-
const exports_rspackVersion = "1.7.0-canary-
|
|
67077
|
+
const exports_rspackVersion = "1.7.0-canary-4941195f-20251224083309";
|
|
66862
67078
|
const exports_version = "5.75.0";
|
|
66863
67079
|
const exports_WebpackError = Error;
|
|
66864
67080
|
const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
|
|
@@ -66946,7 +67162,9 @@ const exports_experiments = {
|
|
|
66946
67162
|
},
|
|
66947
67163
|
CssChunkingPlugin: CssChunkingPlugin,
|
|
66948
67164
|
createNativePlugin: createNativePlugin,
|
|
66949
|
-
VirtualModulesPlugin: VirtualModulesPlugin
|
|
67165
|
+
VirtualModulesPlugin: VirtualModulesPlugin,
|
|
67166
|
+
createRscPlugins: createRscPlugins,
|
|
67167
|
+
RSC_LAYERS_NAMES: RSC_LAYERS_NAMES
|
|
66950
67168
|
};
|
|
66951
67169
|
const ERROR_PREFIX = "Invalid Rspack configuration:";
|
|
66952
67170
|
const validateContext = ({ context })=>{
|
|
@@ -67007,8 +67225,7 @@ function createCompiler(userOptions) {
|
|
|
67007
67225
|
for (const plugin of options.plugins)if ("function" == typeof plugin) plugin.call(compiler, compiler);
|
|
67008
67226
|
else if (plugin) plugin.apply(compiler);
|
|
67009
67227
|
}
|
|
67010
|
-
|
|
67011
|
-
if (platform) compiler.platform = platform;
|
|
67228
|
+
applyRspackOptionsDefaults(compiler.options);
|
|
67012
67229
|
compiler.hooks.environment.call();
|
|
67013
67230
|
compiler.hooks.afterEnvironment.call();
|
|
67014
67231
|
new RspackOptionsApply().process(compiler.options, compiler);
|
|
@@ -67064,7 +67281,7 @@ function rspack(options, callback) {
|
|
|
67064
67281
|
}
|
|
67065
67282
|
{
|
|
67066
67283
|
const { compiler, watch } = create();
|
|
67067
|
-
if (watch) deprecate("A 'callback' argument needs to be provided to the 'rspack(options, callback)' function when the 'watch' option is set. There is no way to handle the 'watch' option without a callback.");
|
|
67284
|
+
if (watch) util_default().deprecate(()=>{}, "A 'callback' argument needs to be provided to the 'rspack(options, callback)' function when the 'watch' option is set. There is no way to handle the 'watch' option without a callback.")();
|
|
67068
67285
|
return compiler;
|
|
67069
67286
|
}
|
|
67070
67287
|
}
|
|
@@ -67270,4 +67487,4 @@ var __webpack_exports__EntryDependency = external_rspack_wasi_browser_js_.EntryD
|
|
|
67270
67487
|
var __webpack_exports__ExternalModule = external_rspack_wasi_browser_js_.ExternalModule;
|
|
67271
67488
|
var __webpack_exports__Module = external_rspack_wasi_browser_js_.Module;
|
|
67272
67489
|
var __webpack_exports__NormalModule = external_rspack_wasi_browser_js_.NormalModule;
|
|
67273
|
-
export { BannerPlugin, BrowserHttpImportEsmPlugin, BrowserRequirePlugin,
|
|
67490
|
+
export { BannerPlugin, BrowserHttpImportEsmPlugin, BrowserRequirePlugin, CircularDependencyRspackPlugin, Compilation, Compiler, ContextReplacementPlugin, Coordinator, CopyRspackPlugin, CssExtractRspackPlugin, DefinePlugin, DllPlugin, DllReferencePlugin, DynamicEntryPlugin, lib_EntryOptionPlugin as EntryOptionPlugin, EntryPlugin, EnvironmentPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, ExternalsPlugin, HotModuleReplacementPlugin, HtmlRspackPlugin, IgnorePlugin, LightningCssMinimizerRspackPlugin, LoaderOptionsPlugin, LoaderTargetPlugin, ModuleFilenameHelpers_namespaceObject as ModuleFilenameHelpers, MultiCompiler, MultiStats, NoEmitOnErrorsPlugin, NormalModuleReplacementPlugin, ProgressPlugin, ProvidePlugin, RscClientPlugin, RscServerPlugin, RspackOptionsApply, DefaultRuntimeGlobals as RuntimeGlobals, RuntimeModule, RuntimePlugin, SourceMapDevToolPlugin, Stats, statsFactoryUtils_StatsErrorCode as StatsErrorCode, SubresourceIntegrityPlugin, SwcJsMinimizerRspackPlugin, Template, ValidationError, WarnCaseSensitiveModulesPlugin, exports_WebpackError as WebpackError, RspackOptionsApply as WebpackOptionsApply, builtinMemFs, exports_config as config, container, electron, exports_experiments as experiments, javascript, lazyCompilationMiddleware, exports_library as library, exports_node as node, optimize, src_rspack_0 as rspack, exports_rspackVersion as rspackVersion, sharing, sources, exports_util as util, exports_version as version, exports_wasm as wasm, web, webworker, __webpack_exports__AsyncDependenciesBlock as AsyncDependenciesBlock, __webpack_exports__ConcatenatedModule as ConcatenatedModule, __webpack_exports__ContextModule as ContextModule, __webpack_exports__Dependency as Dependency, __webpack_exports__EntryDependency as EntryDependency, __webpack_exports__ExternalModule as ExternalModule, __webpack_exports__Module as Module, __webpack_exports__NormalModule as NormalModule };
|
package/dist/napi-binding.d.ts
CHANGED
|
@@ -95,6 +95,8 @@ export interface JsSource {
|
|
|
95
95
|
source: string | Buffer
|
|
96
96
|
map?: string
|
|
97
97
|
}
|
|
98
|
+
|
|
99
|
+
export type CompilerId = void;
|
|
98
100
|
/* -- banner.d.ts end -- */
|
|
99
101
|
|
|
100
102
|
/* -- napi-rs generated below -- */
|
|
@@ -326,7 +328,7 @@ export declare class JsCompilation {
|
|
|
326
328
|
}
|
|
327
329
|
|
|
328
330
|
export declare class JsCompiler {
|
|
329
|
-
constructor(compilerPath: string, options: RawOptions, builtinPlugins: Array<BuiltinPlugin>, registerJsTaps: RegisterJsTaps, outputFilesystem: ThreadsafeNodeFS, intermediateFilesystem: ThreadsafeNodeFS | undefined | null, inputFilesystem: ThreadsafeNodeFS | undefined | null, resolverFactoryReference: JsResolverFactory, unsafeFastDrop: boolean
|
|
331
|
+
constructor(compilerPath: string, options: RawOptions, builtinPlugins: Array<BuiltinPlugin>, registerJsTaps: RegisterJsTaps, outputFilesystem: ThreadsafeNodeFS, intermediateFilesystem: ThreadsafeNodeFS | undefined | null, inputFilesystem: ThreadsafeNodeFS | undefined | null, resolverFactoryReference: JsResolverFactory, unsafeFastDrop: boolean)
|
|
330
332
|
setNonSkippableRegisters(kinds: Array<RegisterJsTapKind>): void
|
|
331
333
|
/** Build with the given option passed to the constructor */
|
|
332
334
|
build(callback: (err: null | Error) => void): void
|
|
@@ -334,6 +336,7 @@ export declare class JsCompiler {
|
|
|
334
336
|
rebuild(changed_files: string[], removed_files: string[], callback: (err: null | Error) => void): void
|
|
335
337
|
close(): Promise<void>
|
|
336
338
|
getVirtualFileStore(): VirtualFileStore | null
|
|
339
|
+
getCompilerId(): ExternalObject<CompilerId>
|
|
337
340
|
}
|
|
338
341
|
|
|
339
342
|
export declare class JsContextModuleFactoryAfterResolveData {
|
|
@@ -361,6 +364,10 @@ export declare class JsContextModuleFactoryBeforeResolveData {
|
|
|
361
364
|
set recursive(recursive: boolean)
|
|
362
365
|
}
|
|
363
366
|
|
|
367
|
+
export declare class JsCoordinator {
|
|
368
|
+
constructor(getServerCompilerIdJsFn: () => ExternalObject<CompilerId>)
|
|
369
|
+
}
|
|
370
|
+
|
|
364
371
|
export declare class JsDependencies {
|
|
365
372
|
get fileDependencies(): Array<string>
|
|
366
373
|
get addedFileDependencies(): Array<string>
|
|
@@ -556,7 +563,7 @@ export declare enum BuiltinPluginName {
|
|
|
556
563
|
RealContentHashPlugin = 'RealContentHashPlugin',
|
|
557
564
|
RemoveEmptyChunksPlugin = 'RemoveEmptyChunksPlugin',
|
|
558
565
|
EnsureChunkConditionsPlugin = 'EnsureChunkConditionsPlugin',
|
|
559
|
-
|
|
566
|
+
WarnCaseSensitiveModulesPlugin = 'WarnCaseSensitiveModulesPlugin',
|
|
560
567
|
DataUriPlugin = 'DataUriPlugin',
|
|
561
568
|
FileUriPlugin = 'FileUriPlugin',
|
|
562
569
|
RuntimePlugin = 'RuntimePlugin',
|
|
@@ -602,7 +609,9 @@ export declare enum BuiltinPluginName {
|
|
|
602
609
|
LazyCompilationPlugin = 'LazyCompilationPlugin',
|
|
603
610
|
ModuleInfoHeaderPlugin = 'ModuleInfoHeaderPlugin',
|
|
604
611
|
HttpUriPlugin = 'HttpUriPlugin',
|
|
605
|
-
CssChunkingPlugin = 'CssChunkingPlugin'
|
|
612
|
+
CssChunkingPlugin = 'CssChunkingPlugin',
|
|
613
|
+
RscServerPlugin = 'RscServerPlugin',
|
|
614
|
+
RscClientPlugin = 'RscClientPlugin'
|
|
606
615
|
}
|
|
607
616
|
|
|
608
617
|
export declare function cleanupGlobalTrace(): void
|
|
@@ -1838,15 +1847,6 @@ export interface RawCircularDependencyRspackPluginOptions {
|
|
|
1838
1847
|
onEnd?: () => void
|
|
1839
1848
|
}
|
|
1840
1849
|
|
|
1841
|
-
export interface RawCompilerPlatform {
|
|
1842
|
-
web?: boolean | null
|
|
1843
|
-
browser?: boolean | null
|
|
1844
|
-
webworker?: boolean | null
|
|
1845
|
-
node?: boolean | null
|
|
1846
|
-
nwjs?: boolean | null
|
|
1847
|
-
electron?: boolean | null
|
|
1848
|
-
}
|
|
1849
|
-
|
|
1850
1850
|
export interface RawConsumeOptions {
|
|
1851
1851
|
key: string
|
|
1852
1852
|
import?: string
|
package/dist/rspack.d.ts
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The following code is modified based on
|
|
3
|
-
* https://github.com/webpack/webpack/blob/4b4ca3b/lib
|
|
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
|
-
*/
|
|
10
1
|
import type { Callback } from "@rspack/lite-tapable";
|
|
11
2
|
import { Compiler } from "./Compiler";
|
|
12
3
|
import { type RspackOptions } from "./config";
|
|
@@ -85,6 +85,7 @@ export const JsCompilation = __napiModule.exports.JsCompilation
|
|
|
85
85
|
export const JsCompiler = __napiModule.exports.JsCompiler
|
|
86
86
|
export const JsContextModuleFactoryAfterResolveData = __napiModule.exports.JsContextModuleFactoryAfterResolveData
|
|
87
87
|
export const JsContextModuleFactoryBeforeResolveData = __napiModule.exports.JsContextModuleFactoryBeforeResolveData
|
|
88
|
+
export const JsCoordinator = __napiModule.exports.JsCoordinator
|
|
88
89
|
export const JsDependencies = __napiModule.exports.JsDependencies
|
|
89
90
|
export const JsEntries = __napiModule.exports.JsEntries
|
|
90
91
|
export const JsExportsInfo = __napiModule.exports.JsExportsInfo
|
|
Binary file
|
package/dist/util/index.d.ts
CHANGED
|
@@ -6,4 +6,3 @@ export declare function serializeObject(map: string | object | undefined | null)
|
|
|
6
6
|
export declare function indent(str: string, prefix: string): string;
|
|
7
7
|
export declare function stringifyLoaderObject(o: LoaderObject): string;
|
|
8
8
|
export declare const unsupported: (name: string, issue?: string) => never;
|
|
9
|
-
export declare function deprecate(message: string): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack-canary/browser",
|
|
3
|
-
"version": "1.7.0-canary-
|
|
3
|
+
"version": "1.7.0-canary-4941195f-20251224083309",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Rspack for running in the browser. This is still in early stage and may not follow the semver.",
|