@rspack-canary/browser 1.7.0-canary-dcc2f8c9-20251223064055 → 1.7.0-canary-ecf3f75d-20251223084957
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 -0
- package/dist/builtin-loader/swc/types.d.ts +4 -0
- package/dist/builtin-plugin/index.d.ts +4 -0
- 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/types.d.ts +0 -1
- package/dist/container/ModuleFederationPlugin.d.ts +0 -2
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +0 -4
- package/dist/exports.d.ts +4 -2
- package/dist/index.mjs +289 -55
- package/dist/napi-binding.d.ts +8 -6
- 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
|
@@ -78,6 +78,7 @@ export type CompilerHooks = {
|
|
|
78
78
|
entryOption: liteTapable.SyncBailHook<[string, EntryNormalized], any>;
|
|
79
79
|
additionalPass: liteTapable.AsyncSeriesHook<[]>;
|
|
80
80
|
};
|
|
81
|
+
export declare const GET_COMPILER_ID: unique symbol;
|
|
81
82
|
declare class Compiler {
|
|
82
83
|
#private;
|
|
83
84
|
hooks: CompilerHooks;
|
|
@@ -21,6 +21,10 @@ export type SwcLoaderOptions = Config & {
|
|
|
21
21
|
* providing better TypeScript development experience and smaller output bundle size.
|
|
22
22
|
*/
|
|
23
23
|
collectTypeScriptInfo?: CollectTypeScriptInfoOptions;
|
|
24
|
+
/**
|
|
25
|
+
* Enable React Server Components support.
|
|
26
|
+
*/
|
|
27
|
+
reactServerComponents?: boolean;
|
|
24
28
|
};
|
|
25
29
|
};
|
|
26
30
|
export interface TerserCompressOptions {
|
|
@@ -72,6 +72,10 @@ export * from "./RslibPlugin";
|
|
|
72
72
|
export * from "./RstestPlugin";
|
|
73
73
|
export * from "./RuntimeChunkPlugin";
|
|
74
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";
|
|
75
79
|
export * from "./SideEffectsFlagPlugin";
|
|
76
80
|
export * from "./SizeLimitsPlugin";
|
|
77
81
|
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,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
|
+
reactServerComponents: string;
|
|
11
|
+
/**
|
|
12
|
+
* Server Side Rendering layer for app.
|
|
13
|
+
*/
|
|
14
|
+
serverSideRendering: string;
|
|
15
|
+
/**
|
|
16
|
+
* The browser client bundle layer for actions.
|
|
17
|
+
*/
|
|
18
|
+
actionBrowser: string;
|
|
19
|
+
};
|
package/dist/config/types.d.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import type { Compiler } from "../Compiler";
|
|
2
2
|
import { type ModuleFederationManifestPluginOptions } from "./ModuleFederationManifestPlugin";
|
|
3
3
|
import type { ModuleFederationPluginV1Options } from "./ModuleFederationPluginV1";
|
|
4
|
-
import { type ModuleFederationRuntimeExperimentsOptions } from "./ModuleFederationRuntimePlugin";
|
|
5
4
|
export interface ModuleFederationPluginOptions extends Omit<ModuleFederationPluginV1Options, "enhanced"> {
|
|
6
5
|
runtimePlugins?: RuntimePlugins;
|
|
7
6
|
implementation?: string;
|
|
8
7
|
shareStrategy?: "version-first" | "loaded-first";
|
|
9
8
|
manifest?: boolean | Omit<ModuleFederationManifestPluginOptions, "remoteAliasMap" | "globalName" | "name" | "exposes" | "shared">;
|
|
10
|
-
experiments?: ModuleFederationRuntimeExperimentsOptions;
|
|
11
9
|
}
|
|
12
10
|
export type RuntimePlugins = string[] | [string, Record<string, unknown>][];
|
|
13
11
|
export declare class ModuleFederationPlugin {
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
export interface ModuleFederationRuntimeExperimentsOptions {
|
|
2
|
-
asyncStartup?: boolean;
|
|
3
|
-
}
|
|
4
1
|
export interface ModuleFederationRuntimeOptions {
|
|
5
2
|
entryRuntime?: string;
|
|
6
|
-
experiments?: ModuleFederationRuntimeExperimentsOptions;
|
|
7
3
|
}
|
|
8
4
|
export declare const ModuleFederationRuntimePlugin: {
|
|
9
5
|
new (options?: ModuleFederationRuntimeOptions | undefined): {
|
package/dist/exports.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export { EnvironmentPlugin } from "./lib/EnvironmentPlugin";
|
|
|
55
55
|
export { LoaderOptionsPlugin } from "./lib/LoaderOptionsPlugin";
|
|
56
56
|
export { LoaderTargetPlugin } from "./lib/LoaderTargetPlugin";
|
|
57
57
|
export type { OutputFileSystem, WatchFileSystem } from "./util/fs";
|
|
58
|
-
import { EsmLibraryPlugin, FetchCompileAsyncWasmPlugin, lazyCompilationMiddleware, SubresourceIntegrityPlugin } from "./builtin-plugin";
|
|
58
|
+
import { createRscPlugins, EsmLibraryPlugin, FetchCompileAsyncWasmPlugin, lazyCompilationMiddleware, RSC_LAYERS_NAMES, SubresourceIntegrityPlugin } from "./builtin-plugin";
|
|
59
59
|
export { SubresourceIntegrityPlugin };
|
|
60
60
|
interface Web {
|
|
61
61
|
FetchCompileAsyncWasmPlugin: typeof FetchCompileAsyncWasmPlugin;
|
|
@@ -132,7 +132,7 @@ export declare const sharing: {
|
|
|
132
132
|
export type { FeatureOptions as LightningcssFeatureOptions, LoaderOptions as LightningcssLoaderOptions } from "./builtin-loader/lightningcss/index";
|
|
133
133
|
export type { SwcLoaderEnvConfig, SwcLoaderEsParserConfig, SwcLoaderJscConfig, SwcLoaderModuleConfig, SwcLoaderOptions, SwcLoaderParserConfig, SwcLoaderTransformConfig, SwcLoaderTsParserConfig } from "./builtin-loader/swc/index";
|
|
134
134
|
export type { CircularDependencyRspackPluginOptions, CopyRspackPluginOptions, CssExtractRspackLoaderOptions, CssExtractRspackPluginOptions, EvalDevToolModulePluginOptions, HtmlRspackPluginOptions, LightningCssMinimizerRspackPluginOptions, RsdoctorPluginData, RsdoctorPluginHooks, SourceMapDevToolPluginOptions, SubresourceIntegrityPluginOptions, SwcJsMinimizerRspackPluginOptions } from "./builtin-plugin";
|
|
135
|
-
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";
|
|
136
136
|
import { EnforceExtension, ResolverFactory, async as resolveAsync, sync as resolveSync } from "./binding";
|
|
137
137
|
import { createNativePlugin } from "./builtin-plugin";
|
|
138
138
|
import { minify, minifySync, transform, transformSync } from "./swc";
|
|
@@ -170,5 +170,7 @@ interface Experiments {
|
|
|
170
170
|
CssChunkingPlugin: typeof CssChunkingPlugin;
|
|
171
171
|
createNativePlugin: typeof createNativePlugin;
|
|
172
172
|
VirtualModulesPlugin: typeof VirtualModulesPlugin;
|
|
173
|
+
createRscPlugins: typeof createRscPlugins;
|
|
174
|
+
RSC_LAYERS_NAMES: typeof RSC_LAYERS_NAMES;
|
|
173
175
|
}
|
|
174
176
|
export declare const experiments: Experiments;
|
package/dist/index.mjs
CHANGED
|
@@ -50568,6 +50568,7 @@ __webpack_require__.d(exports_namespaceObject, {
|
|
|
50568
50568
|
ConcatenatedModule: ()=>external_rspack_wasi_browser_js_.ConcatenatedModule,
|
|
50569
50569
|
ContextModule: ()=>external_rspack_wasi_browser_js_.ContextModule,
|
|
50570
50570
|
ContextReplacementPlugin: ()=>ContextReplacementPlugin,
|
|
50571
|
+
Coordinator: ()=>Coordinator,
|
|
50571
50572
|
CopyRspackPlugin: ()=>CopyRspackPlugin,
|
|
50572
50573
|
CssExtractRspackPlugin: ()=>CssExtractRspackPlugin,
|
|
50573
50574
|
DefinePlugin: ()=>DefinePlugin,
|
|
@@ -50598,6 +50599,8 @@ __webpack_require__.d(exports_namespaceObject, {
|
|
|
50598
50599
|
NormalModuleReplacementPlugin: ()=>NormalModuleReplacementPlugin,
|
|
50599
50600
|
ProgressPlugin: ()=>ProgressPlugin,
|
|
50600
50601
|
ProvidePlugin: ()=>ProvidePlugin,
|
|
50602
|
+
RscClientPlugin: ()=>RscClientPlugin,
|
|
50603
|
+
RscServerPlugin: ()=>RscServerPlugin,
|
|
50601
50604
|
RspackOptionsApply: ()=>RspackOptionsApply,
|
|
50602
50605
|
RuntimeGlobals: ()=>DefaultRuntimeGlobals,
|
|
50603
50606
|
RuntimeModule: ()=>RuntimeModule,
|
|
@@ -53498,16 +53501,10 @@ function stringifyLoaderObject(o) {
|
|
|
53498
53501
|
return o.path + o.query + o.fragment;
|
|
53499
53502
|
}
|
|
53500
53503
|
const unsupported = (name, issue)=>{
|
|
53501
|
-
let s = `${name} is not supported by
|
|
53502
|
-
if (issue) s += `
|
|
53504
|
+
let s = `${name} is not supported by rspack.`;
|
|
53505
|
+
if (issue) s += ` Please refer to issue ${issue} for more information.`;
|
|
53503
53506
|
throw new Error(s);
|
|
53504
53507
|
};
|
|
53505
|
-
const warnedMessages = new Set();
|
|
53506
|
-
function deprecate(message) {
|
|
53507
|
-
if (warnedMessages.has(message)) return;
|
|
53508
|
-
warnedMessages.add(message);
|
|
53509
|
-
console.warn(`[Rspack Deprecation] ${message}`);
|
|
53510
|
-
}
|
|
53511
53508
|
const WINDOWS_ABS_PATH_REGEXP = /^[a-zA-Z]:[\\/]/;
|
|
53512
53509
|
const SEGMENTS_SPLIT_REGEXP = /([|!])/;
|
|
53513
53510
|
const WINDOWS_PATH_SEPARATOR_REGEXP = /\\/g;
|
|
@@ -56361,9 +56358,23 @@ const lazyCompilationMiddleware = (compiler)=>{
|
|
|
56361
56358
|
if (compiler instanceof MultiCompiler) {
|
|
56362
56359
|
const middlewareByCompiler = new Map();
|
|
56363
56360
|
let i = 0;
|
|
56361
|
+
let isReportDeprecatedWarned = false;
|
|
56362
|
+
let isReportRepeatWarned = false;
|
|
56364
56363
|
for (const c of compiler.compilers){
|
|
56365
|
-
if (c.options.experiments.lazyCompilation)
|
|
56366
|
-
|
|
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
|
+
}
|
|
56367
56378
|
if (!c.options.lazyCompilation && !c.options.experiments.lazyCompilation) continue;
|
|
56368
56379
|
const options = {
|
|
56369
56380
|
...c.options.experiments.lazyCompilation,
|
|
@@ -56386,8 +56397,8 @@ const lazyCompilationMiddleware = (compiler)=>{
|
|
|
56386
56397
|
};
|
|
56387
56398
|
}
|
|
56388
56399
|
if (compiler.options.experiments.lazyCompilation) {
|
|
56389
|
-
|
|
56390
|
-
if (compiler.options.lazyCompilation)
|
|
56400
|
+
console.warn(DEPRECATED_LAZY_COMPILATION_OPTIONS_WARN);
|
|
56401
|
+
if (compiler.options.lazyCompilation) console.warn(REPEAT_LAZY_COMPILATION_OPTIONS_WARN);
|
|
56391
56402
|
}
|
|
56392
56403
|
if (!compiler.options.lazyCompilation && !compiler.options.experiments.lazyCompilation) return noop;
|
|
56393
56404
|
const activeModules = new Set();
|
|
@@ -56675,6 +56686,238 @@ const createRuntimePluginHooksRegisters = (getCompiler, createTap)=>({
|
|
|
56675
56686
|
};
|
|
56676
56687
|
})
|
|
56677
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
|
+
reactServerComponents: "react-server-components",
|
|
56918
|
+
serverSideRendering: "server-side-rendering",
|
|
56919
|
+
actionBrowser: "action-browser"
|
|
56920
|
+
};
|
|
56678
56921
|
const SideEffectsFlagPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.SideEffectsFlagPlugin, ()=>{}, "compilation");
|
|
56679
56922
|
const SizeLimitsPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.SizeLimitsPlugin, (options)=>{
|
|
56680
56923
|
const hints = false === options.hints ? void 0 : options.hints;
|
|
@@ -58213,7 +58456,7 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
|
58213
58456
|
if ("object" == typeof rspackFuture) {
|
|
58214
58457
|
D(rspackFuture, "bundlerInfo", {});
|
|
58215
58458
|
if ("object" == typeof rspackFuture.bundlerInfo) {
|
|
58216
|
-
D(rspackFuture.bundlerInfo, "version", "1.7.0-canary-
|
|
58459
|
+
D(rspackFuture.bundlerInfo, "version", "1.7.0-canary-ecf3f75d-20251223084957");
|
|
58217
58460
|
D(rspackFuture.bundlerInfo, "bundler", "rspack");
|
|
58218
58461
|
D(rspackFuture.bundlerInfo, "force", !library);
|
|
58219
58462
|
}
|
|
@@ -58931,7 +59174,7 @@ const getNormalizedRspackOptions = (config)=>({
|
|
|
58931
59174
|
main: {}
|
|
58932
59175
|
} : "function" == typeof config.entry ? ((fn)=>()=>Promise.resolve().then(fn).then(getNormalizedEntryStatic))(config.entry) : getNormalizedEntryStatic(config.entry),
|
|
58933
59176
|
output: nestedConfig(config.output, (output)=>{
|
|
58934
|
-
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")();
|
|
58935
59178
|
const { library } = output;
|
|
58936
59179
|
const libraryAsName = library;
|
|
58937
59180
|
const libraryBase = "object" == typeof library && library && !Array.isArray(library) && "type" in library ? library : libraryAsName || output.libraryTarget ? {
|
|
@@ -59082,12 +59325,12 @@ const getNormalizedRspackOptions = (config)=>({
|
|
|
59082
59325
|
...p
|
|
59083
59326
|
]),
|
|
59084
59327
|
experiments: nestedConfig(config.experiments, (experiments)=>{
|
|
59085
|
-
if (experiments.layers) deprecate("`experiments.layers` config
|
|
59086
|
-
if (false === experiments.topLevelAwait) deprecate("`experiments.topLevelAwait` config
|
|
59087
|
-
if (experiments.lazyBarrel) deprecate("`experiments.lazyBarrel` config
|
|
59088
|
-
if (experiments.inlineConst) deprecate("`experiments.inlineConst` config
|
|
59089
|
-
if (experiments.inlineEnum) deprecate("`experiments.inlineEnum` config
|
|
59090
|
-
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.")();
|
|
59091
59334
|
return {
|
|
59092
59335
|
...experiments,
|
|
59093
59336
|
cache: optionalNestedConfig(experiments.cache, (cache)=>{
|
|
@@ -60282,13 +60525,13 @@ function Resolver_class_private_field_set(receiver, privateMap, value) {
|
|
|
60282
60525
|
Resolver_class_apply_descriptor_set(receiver, descriptor, value);
|
|
60283
60526
|
return value;
|
|
60284
60527
|
}
|
|
60285
|
-
var
|
|
60528
|
+
var Resolver_binding = /*#__PURE__*/ new WeakMap();
|
|
60286
60529
|
class Resolver {
|
|
60287
60530
|
resolveSync(_context, path, request) {
|
|
60288
|
-
return Resolver_class_private_field_get(this,
|
|
60531
|
+
return Resolver_class_private_field_get(this, Resolver_binding).resolveSync(path, request) ?? false;
|
|
60289
60532
|
}
|
|
60290
60533
|
resolve(_context, path, request, resolveContext, callback) {
|
|
60291
|
-
Resolver_class_private_field_get(this,
|
|
60534
|
+
Resolver_class_private_field_get(this, Resolver_binding).resolve(path, request, (error, text)=>{
|
|
60292
60535
|
if (error) return void callback(error);
|
|
60293
60536
|
const req = text ? JSON.parse(text) : void 0;
|
|
60294
60537
|
if (req?.fileDependencies) req.fileDependencies.forEach((file)=>{
|
|
@@ -60301,11 +60544,11 @@ class Resolver {
|
|
|
60301
60544
|
});
|
|
60302
60545
|
}
|
|
60303
60546
|
constructor(binding){
|
|
60304
|
-
Resolver_class_private_field_init(this,
|
|
60547
|
+
Resolver_class_private_field_init(this, Resolver_binding, {
|
|
60305
60548
|
writable: true,
|
|
60306
60549
|
value: void 0
|
|
60307
60550
|
});
|
|
60308
|
-
Resolver_class_private_field_set(this,
|
|
60551
|
+
Resolver_class_private_field_set(this, Resolver_binding, binding);
|
|
60309
60552
|
}
|
|
60310
60553
|
}
|
|
60311
60554
|
function ResolverFactory_check_private_redeclaration(obj, privateCollection) {
|
|
@@ -61705,6 +61948,7 @@ function Compiler_define_property(obj, key, value) {
|
|
|
61705
61948
|
return obj;
|
|
61706
61949
|
}
|
|
61707
61950
|
const COMPILATION_WEAK_MAP = new WeakMap();
|
|
61951
|
+
const GET_COMPILER_ID = Symbol("getCompilerId");
|
|
61708
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();
|
|
61709
61953
|
class Compiler {
|
|
61710
61954
|
get recordsInputPath() {
|
|
@@ -62170,6 +62414,12 @@ class Compiler {
|
|
|
62170
62414
|
this.resolverFactory = new ResolverFactory(options.resolve.pnp ?? getPnpDefault(), options.resolve, options.resolveLoader);
|
|
62171
62415
|
new JsLoaderRspackPlugin(this).apply(this);
|
|
62172
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
|
+
});
|
|
62173
62423
|
}
|
|
62174
62424
|
}
|
|
62175
62425
|
function build(callback) {
|
|
@@ -62371,7 +62621,7 @@ class MultiStats {
|
|
|
62371
62621
|
return obj;
|
|
62372
62622
|
});
|
|
62373
62623
|
if (childOptions.version) {
|
|
62374
|
-
obj.rspackVersion = "1.7.0-canary-
|
|
62624
|
+
obj.rspackVersion = "1.7.0-canary-ecf3f75d-20251223084957";
|
|
62375
62625
|
obj.version = "5.75.0";
|
|
62376
62626
|
}
|
|
62377
62627
|
if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join("");
|
|
@@ -63687,7 +63937,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
63687
63937
|
},
|
|
63688
63938
|
version: (object)=>{
|
|
63689
63939
|
object.version = "5.75.0";
|
|
63690
|
-
object.rspackVersion = "1.7.0-canary-
|
|
63940
|
+
object.rspackVersion = "1.7.0-canary-ecf3f75d-20251223084957";
|
|
63691
63941
|
},
|
|
63692
63942
|
env: (object, _compilation, _context, { _env })=>{
|
|
63693
63943
|
object.env = _env;
|
|
@@ -66255,26 +66505,13 @@ class ModuleFederationPlugin {
|
|
|
66255
66505
|
...compiler.options.resolve.alias
|
|
66256
66506
|
};
|
|
66257
66507
|
const entryRuntime = getDefaultEntryRuntime(paths, this._options, compiler);
|
|
66258
|
-
const runtimeExperiments = {
|
|
66259
|
-
asyncStartup: this._options.experiments?.asyncStartup ?? false
|
|
66260
|
-
};
|
|
66261
66508
|
new ModuleFederationRuntimePlugin({
|
|
66262
|
-
entryRuntime
|
|
66263
|
-
experiments: runtimeExperiments
|
|
66509
|
+
entryRuntime
|
|
66264
66510
|
}).apply(compiler);
|
|
66265
|
-
|
|
66266
|
-
|
|
66267
|
-
exposes: this._options.exposes,
|
|
66268
|
-
filename: this._options.filename,
|
|
66269
|
-
library: this._options.library,
|
|
66270
|
-
remoteType: this._options.remoteType,
|
|
66271
|
-
remotes: this._options.remotes,
|
|
66272
|
-
runtime: this._options.runtime,
|
|
66273
|
-
shareScope: this._options.shareScope,
|
|
66274
|
-
shared: this._options.shared,
|
|
66511
|
+
new webpack.container.ModuleFederationPluginV1({
|
|
66512
|
+
...this._options,
|
|
66275
66513
|
enhanced: true
|
|
66276
|
-
};
|
|
66277
|
-
new webpack.container.ModuleFederationPluginV1(v1Options).apply(compiler);
|
|
66514
|
+
}).apply(compiler);
|
|
66278
66515
|
if (this._options.manifest) {
|
|
66279
66516
|
const manifestOptions = true === this._options.manifest ? {} : {
|
|
66280
66517
|
...this._options.manifest
|
|
@@ -66734,19 +66971,14 @@ class ContainerReferencePlugin extends RspackBuiltinPlugin {
|
|
|
66734
66971
|
raw(compiler) {
|
|
66735
66972
|
const { remoteType, remotes } = this._options;
|
|
66736
66973
|
const remoteExternals = {};
|
|
66737
|
-
const importExternals = {};
|
|
66738
66974
|
for (const [key, config] of remotes){
|
|
66739
66975
|
let i = 0;
|
|
66740
|
-
for (const external of config.external){
|
|
66741
|
-
|
|
66742
|
-
const request = `webpack/container/reference/${key}${i ? `/fallback-${i}` : ""}`;
|
|
66743
|
-
if (("module" === remoteType || "module-import" === remoteType) && external.startsWith(".")) importExternals[request] = external;
|
|
66744
|
-
else remoteExternals[request] = external;
|
|
66976
|
+
for (const external of config.external)if (!external.startsWith("internal ")) {
|
|
66977
|
+
remoteExternals[`webpack/container/reference/${key}${i ? `/fallback-${i}` : ""}`] = external;
|
|
66745
66978
|
i++;
|
|
66746
66979
|
}
|
|
66747
66980
|
}
|
|
66748
66981
|
new ExternalsPlugin(remoteType, remoteExternals, true).apply(compiler);
|
|
66749
|
-
if (Object.keys(importExternals).length > 0) new ExternalsPlugin("import", importExternals, true).apply(compiler);
|
|
66750
66982
|
new ShareRuntimePlugin(this._options.enhanced).apply(compiler);
|
|
66751
66983
|
const rawOptions = {
|
|
66752
66984
|
remoteType: this._options.remoteType,
|
|
@@ -66842,7 +67074,7 @@ function transformSync(source, options) {
|
|
|
66842
67074
|
const _options = JSON.stringify(options || {});
|
|
66843
67075
|
return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
|
|
66844
67076
|
}
|
|
66845
|
-
const exports_rspackVersion = "1.7.0-canary-
|
|
67077
|
+
const exports_rspackVersion = "1.7.0-canary-ecf3f75d-20251223084957";
|
|
66846
67078
|
const exports_version = "5.75.0";
|
|
66847
67079
|
const exports_WebpackError = Error;
|
|
66848
67080
|
const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
|
|
@@ -66930,7 +67162,9 @@ const exports_experiments = {
|
|
|
66930
67162
|
},
|
|
66931
67163
|
CssChunkingPlugin: CssChunkingPlugin,
|
|
66932
67164
|
createNativePlugin: createNativePlugin,
|
|
66933
|
-
VirtualModulesPlugin: VirtualModulesPlugin
|
|
67165
|
+
VirtualModulesPlugin: VirtualModulesPlugin,
|
|
67166
|
+
createRscPlugins: createRscPlugins,
|
|
67167
|
+
RSC_LAYERS_NAMES: RSC_LAYERS_NAMES
|
|
66934
67168
|
};
|
|
66935
67169
|
const ERROR_PREFIX = "Invalid Rspack configuration:";
|
|
66936
67170
|
const validateContext = ({ context })=>{
|
|
@@ -67047,7 +67281,7 @@ function rspack(options, callback) {
|
|
|
67047
67281
|
}
|
|
67048
67282
|
{
|
|
67049
67283
|
const { compiler, watch } = create();
|
|
67050
|
-
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.")();
|
|
67051
67285
|
return compiler;
|
|
67052
67286
|
}
|
|
67053
67287
|
}
|
|
@@ -67253,4 +67487,4 @@ var __webpack_exports__EntryDependency = external_rspack_wasi_browser_js_.EntryD
|
|
|
67253
67487
|
var __webpack_exports__ExternalModule = external_rspack_wasi_browser_js_.ExternalModule;
|
|
67254
67488
|
var __webpack_exports__Module = external_rspack_wasi_browser_js_.Module;
|
|
67255
67489
|
var __webpack_exports__NormalModule = external_rspack_wasi_browser_js_.NormalModule;
|
|
67256
|
-
export { BannerPlugin, BrowserHttpImportEsmPlugin, BrowserRequirePlugin, CircularDependencyRspackPlugin, Compilation, Compiler, ContextReplacementPlugin, 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, 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 };
|
|
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
|
@@ -334,6 +334,7 @@ export declare class JsCompiler {
|
|
|
334
334
|
rebuild(changed_files: string[], removed_files: string[], callback: (err: null | Error) => void): void
|
|
335
335
|
close(): Promise<void>
|
|
336
336
|
getVirtualFileStore(): VirtualFileStore | null
|
|
337
|
+
getCompilerId(): ExternalObject<CompilerId>
|
|
337
338
|
}
|
|
338
339
|
|
|
339
340
|
export declare class JsContextModuleFactoryAfterResolveData {
|
|
@@ -361,6 +362,10 @@ export declare class JsContextModuleFactoryBeforeResolveData {
|
|
|
361
362
|
set recursive(recursive: boolean)
|
|
362
363
|
}
|
|
363
364
|
|
|
365
|
+
export declare class JsCoordinator {
|
|
366
|
+
constructor(getServerCompilerIdJsFn: () => ExternalObject<CompilerId>)
|
|
367
|
+
}
|
|
368
|
+
|
|
364
369
|
export declare class JsDependencies {
|
|
365
370
|
get fileDependencies(): Array<string>
|
|
366
371
|
get addedFileDependencies(): Array<string>
|
|
@@ -602,7 +607,9 @@ export declare enum BuiltinPluginName {
|
|
|
602
607
|
LazyCompilationPlugin = 'LazyCompilationPlugin',
|
|
603
608
|
ModuleInfoHeaderPlugin = 'ModuleInfoHeaderPlugin',
|
|
604
609
|
HttpUriPlugin = 'HttpUriPlugin',
|
|
605
|
-
CssChunkingPlugin = 'CssChunkingPlugin'
|
|
610
|
+
CssChunkingPlugin = 'CssChunkingPlugin',
|
|
611
|
+
RscServerPlugin = 'RscServerPlugin',
|
|
612
|
+
RscClientPlugin = 'RscClientPlugin'
|
|
606
613
|
}
|
|
607
614
|
|
|
608
615
|
export declare function cleanupGlobalTrace(): void
|
|
@@ -2462,13 +2469,8 @@ export interface RawModuleFederationManifestPluginOptions {
|
|
|
2462
2469
|
buildInfo?: RawStatsBuildInfo
|
|
2463
2470
|
}
|
|
2464
2471
|
|
|
2465
|
-
export interface RawModuleFederationRuntimeExperimentsOptions {
|
|
2466
|
-
asyncStartup?: boolean
|
|
2467
|
-
}
|
|
2468
|
-
|
|
2469
2472
|
export interface RawModuleFederationRuntimePluginOptions {
|
|
2470
2473
|
entryRuntime?: string | undefined
|
|
2471
|
-
experiments?: RawModuleFederationRuntimeExperimentsOptions
|
|
2472
2474
|
}
|
|
2473
2475
|
|
|
2474
2476
|
export interface RawModuleFilenameTemplateFnCtx {
|
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-ecf3f75d-20251223084957",
|
|
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.",
|