@rspack-canary/browser 1.7.0-canary-4941195f-20251224083309 → 1.7.0-canary-08772c3f-20251224173339
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 +3 -1
- package/dist/builtin-loader/swc/types.d.ts +6 -4
- package/dist/builtin-plugin/{WarnCaseSensitiveModulesPlugin.d.ts → CaseSensitivePlugin.d.ts} +1 -1
- package/dist/builtin-plugin/index.d.ts +1 -5
- package/dist/config/defaults.d.ts +10 -1
- package/dist/config/target.d.ts +6 -6
- package/dist/config/types.d.ts +1 -0
- package/dist/exports.d.ts +7 -5
- package/dist/index.mjs +93 -304
- package/dist/napi-binding.d.ts +12 -12
- package/dist/rspack.d.ts +9 -0
- package/dist/rspack.wasi-browser.js +0 -1
- package/dist/rspack.wasm32-wasi.wasm +0 -0
- package/dist/util/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/builtin-plugin/rsc/Coordinator.d.ts +0 -8
- package/dist/builtin-plugin/rsc/RscClientPlugin.d.ts +0 -10
- package/dist/builtin-plugin/rsc/RscServerPlugin.d.ts +0 -10
- package/dist/builtin-plugin/rsc/index.d.ts +0 -19
package/dist/Compiler.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ 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";
|
|
19
20
|
import type { FileSystemInfoEntry } from "./FileSystemInfo";
|
|
20
21
|
import { rspack } from "./index";
|
|
21
22
|
import Cache from "./lib/Cache";
|
|
@@ -78,7 +79,6 @@ export type CompilerHooks = {
|
|
|
78
79
|
entryOption: liteTapable.SyncBailHook<[string, EntryNormalized], any>;
|
|
79
80
|
additionalPass: liteTapable.AsyncSeriesHook<[]>;
|
|
80
81
|
};
|
|
81
|
-
export declare const GET_COMPILER_ID: unique symbol;
|
|
82
82
|
declare class Compiler {
|
|
83
83
|
#private;
|
|
84
84
|
hooks: CompilerHooks;
|
|
@@ -127,6 +127,8 @@ 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);
|
|
130
132
|
/**
|
|
131
133
|
* Note: This is not a webpack public API, maybe removed in future.
|
|
132
134
|
* @internal
|
|
@@ -10,6 +10,11 @@ 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;
|
|
13
18
|
/**
|
|
14
19
|
* Experimental features provided by Rspack.
|
|
15
20
|
* @experimental
|
|
@@ -17,14 +22,11 @@ export type SwcLoaderOptions = Config & {
|
|
|
17
22
|
rspackExperiments?: {
|
|
18
23
|
import?: PluginImportOptions;
|
|
19
24
|
/**
|
|
25
|
+
* @deprecated Use top-level `collectTypeScriptInfo` instead.
|
|
20
26
|
* Collects information from TypeScript's AST for consumption by subsequent Rspack processes,
|
|
21
27
|
* providing better TypeScript development experience and smaller output bundle size.
|
|
22
28
|
*/
|
|
23
29
|
collectTypeScriptInfo?: CollectTypeScriptInfoOptions;
|
|
24
|
-
/**
|
|
25
|
-
* Enable React Server Components support.
|
|
26
|
-
*/
|
|
27
|
-
reactServerComponents?: boolean;
|
|
28
30
|
};
|
|
29
31
|
};
|
|
30
32
|
export interface TerserCompressOptions {
|
|
@@ -5,6 +5,7 @@ export * from "./AsyncWebAssemblyModulesPlugin";
|
|
|
5
5
|
export * from "./BannerPlugin";
|
|
6
6
|
export * from "./BundlerInfoRspackPlugin";
|
|
7
7
|
export { createNativePlugin, RspackBuiltinPlugin } from "./base";
|
|
8
|
+
export * from "./CaseSensitivePlugin";
|
|
8
9
|
export * from "./ChunkPrefetchPreloadPlugin";
|
|
9
10
|
export * from "./CircularDependencyRspackPlugin";
|
|
10
11
|
export * from "./CommonJsChunkFormatPlugin";
|
|
@@ -72,10 +73,6 @@ export * from "./RslibPlugin";
|
|
|
72
73
|
export * from "./RstestPlugin";
|
|
73
74
|
export * from "./RuntimeChunkPlugin";
|
|
74
75
|
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";
|
|
79
76
|
export * from "./SideEffectsFlagPlugin";
|
|
80
77
|
export * from "./SizeLimitsPlugin";
|
|
81
78
|
export * from "./SourceMapDevToolPlugin";
|
|
@@ -83,6 +80,5 @@ export * from "./SplitChunksPlugin";
|
|
|
83
80
|
export * from "./SubresourceIntegrityPlugin";
|
|
84
81
|
export * from "./SwcJsMinimizerPlugin";
|
|
85
82
|
export * from "./URLPlugin";
|
|
86
|
-
export * from "./WarnCaseSensitiveModulesPlugin";
|
|
87
83
|
export * from "./WebWorkerTemplatePlugin";
|
|
88
84
|
export * from "./WorkerPlugin";
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import type { RspackOptionsNormalized } from "./normalization";
|
|
2
|
-
export declare const applyRspackOptionsDefaults: (options: RspackOptionsNormalized) =>
|
|
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
|
+
};
|
|
3
12
|
export declare const applyRspackOptionsBaseDefaults: (options: RspackOptionsNormalized) => void;
|
|
4
13
|
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,7 +47,11 @@ 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,
|
|
50
|
+
export { BannerPlugin, CaseSensitivePlugin,
|
|
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";
|
|
51
55
|
export { DllPlugin, type DllPluginOptions } from "./lib/DllPlugin";
|
|
52
56
|
export { DllReferencePlugin, type DllReferencePluginOptions, type DllReferencePluginOptionsContent, type DllReferencePluginOptionsManifest, type DllReferencePluginOptionsSourceType } from "./lib/DllReferencePlugin";
|
|
53
57
|
export { default as EntryOptionPlugin } from "./lib/EntryOptionPlugin";
|
|
@@ -55,7 +59,7 @@ export { EnvironmentPlugin } from "./lib/EnvironmentPlugin";
|
|
|
55
59
|
export { LoaderOptionsPlugin } from "./lib/LoaderOptionsPlugin";
|
|
56
60
|
export { LoaderTargetPlugin } from "./lib/LoaderTargetPlugin";
|
|
57
61
|
export type { OutputFileSystem, WatchFileSystem } from "./util/fs";
|
|
58
|
-
import {
|
|
62
|
+
import { EsmLibraryPlugin, FetchCompileAsyncWasmPlugin, lazyCompilationMiddleware, SubresourceIntegrityPlugin } from "./builtin-plugin";
|
|
59
63
|
export { SubresourceIntegrityPlugin };
|
|
60
64
|
interface Web {
|
|
61
65
|
FetchCompileAsyncWasmPlugin: typeof FetchCompileAsyncWasmPlugin;
|
|
@@ -132,7 +136,7 @@ export declare const sharing: {
|
|
|
132
136
|
export type { FeatureOptions as LightningcssFeatureOptions, LoaderOptions as LightningcssLoaderOptions } from "./builtin-loader/lightningcss/index";
|
|
133
137
|
export type { SwcLoaderEnvConfig, SwcLoaderEsParserConfig, SwcLoaderJscConfig, SwcLoaderModuleConfig, SwcLoaderOptions, SwcLoaderParserConfig, SwcLoaderTransformConfig, SwcLoaderTsParserConfig } from "./builtin-loader/swc/index";
|
|
134
138
|
export type { CircularDependencyRspackPluginOptions, CopyRspackPluginOptions, CssExtractRspackLoaderOptions, CssExtractRspackPluginOptions, EvalDevToolModulePluginOptions, HtmlRspackPluginOptions, LightningCssMinimizerRspackPluginOptions, RsdoctorPluginData, RsdoctorPluginHooks, SourceMapDevToolPluginOptions, SubresourceIntegrityPluginOptions, SwcJsMinimizerRspackPluginOptions } from "./builtin-plugin";
|
|
135
|
-
export { CircularDependencyRspackPlugin, ContextReplacementPlugin,
|
|
139
|
+
export { CircularDependencyRspackPlugin, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, HtmlRspackPlugin, LightningCssMinimizerRspackPlugin, NormalModuleReplacementPlugin, SourceMapDevToolPlugin, SwcJsMinimizerRspackPlugin } from "./builtin-plugin";
|
|
136
140
|
import { EnforceExtension, ResolverFactory, async as resolveAsync, sync as resolveSync } from "./binding";
|
|
137
141
|
import { createNativePlugin } from "./builtin-plugin";
|
|
138
142
|
import { minify, minifySync, transform, transformSync } from "./swc";
|
|
@@ -170,7 +174,5 @@ interface Experiments {
|
|
|
170
174
|
CssChunkingPlugin: typeof CssChunkingPlugin;
|
|
171
175
|
createNativePlugin: typeof createNativePlugin;
|
|
172
176
|
VirtualModulesPlugin: typeof VirtualModulesPlugin;
|
|
173
|
-
createRscPlugins: typeof createRscPlugins;
|
|
174
|
-
RSC_LAYERS_NAMES: typeof RSC_LAYERS_NAMES;
|
|
175
177
|
}
|
|
176
178
|
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,
|
|
50565
50566
|
CircularDependencyRspackPlugin: ()=>CircularDependencyRspackPlugin,
|
|
50566
50567
|
Compilation: ()=>Compilation,
|
|
50567
50568
|
Compiler: ()=>Compiler,
|
|
50568
50569
|
ConcatenatedModule: ()=>external_rspack_wasi_browser_js_.ConcatenatedModule,
|
|
50569
50570
|
ContextModule: ()=>external_rspack_wasi_browser_js_.ContextModule,
|
|
50570
50571
|
ContextReplacementPlugin: ()=>ContextReplacementPlugin,
|
|
50571
|
-
Coordinator: ()=>Coordinator,
|
|
50572
50572
|
CopyRspackPlugin: ()=>CopyRspackPlugin,
|
|
50573
50573
|
CssExtractRspackPlugin: ()=>CssExtractRspackPlugin,
|
|
50574
50574
|
DefinePlugin: ()=>DefinePlugin,
|
|
@@ -50599,8 +50599,6 @@ __webpack_require__.d(exports_namespaceObject, {
|
|
|
50599
50599
|
NormalModuleReplacementPlugin: ()=>NormalModuleReplacementPlugin,
|
|
50600
50600
|
ProgressPlugin: ()=>ProgressPlugin,
|
|
50601
50601
|
ProvidePlugin: ()=>ProvidePlugin,
|
|
50602
|
-
RscClientPlugin: ()=>RscClientPlugin,
|
|
50603
|
-
RscServerPlugin: ()=>RscServerPlugin,
|
|
50604
50602
|
RspackOptionsApply: ()=>RspackOptionsApply,
|
|
50605
50603
|
RuntimeGlobals: ()=>DefaultRuntimeGlobals,
|
|
50606
50604
|
RuntimeModule: ()=>RuntimeModule,
|
|
@@ -50612,7 +50610,7 @@ __webpack_require__.d(exports_namespaceObject, {
|
|
|
50612
50610
|
SwcJsMinimizerRspackPlugin: ()=>SwcJsMinimizerRspackPlugin,
|
|
50613
50611
|
Template: ()=>Template,
|
|
50614
50612
|
ValidationError: ()=>ValidationError,
|
|
50615
|
-
WarnCaseSensitiveModulesPlugin: ()=>
|
|
50613
|
+
WarnCaseSensitiveModulesPlugin: ()=>CaseSensitivePlugin,
|
|
50616
50614
|
WebpackError: ()=>exports_WebpackError,
|
|
50617
50615
|
WebpackOptionsApply: ()=>RspackOptionsApply,
|
|
50618
50616
|
config: ()=>exports_config,
|
|
@@ -52993,6 +52991,7 @@ const BundlerInfoRspackPlugin = base_create(external_rspack_wasi_browser_js_.Bui
|
|
|
52993
52991
|
bundler: options.bundler || "rspack",
|
|
52994
52992
|
force: options.force ?? true
|
|
52995
52993
|
}));
|
|
52994
|
+
const CaseSensitivePlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.CaseSensitivePlugin, ()=>{}, "compilation");
|
|
52996
52995
|
const ChunkPrefetchPreloadPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.ChunkPrefetchPreloadPlugin, ()=>{});
|
|
52997
52996
|
function CircularDependencyRspackPlugin_define_property(obj, key, value) {
|
|
52998
52997
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
@@ -53501,10 +53500,16 @@ function stringifyLoaderObject(o) {
|
|
|
53501
53500
|
return o.path + o.query + o.fragment;
|
|
53502
53501
|
}
|
|
53503
53502
|
const unsupported = (name, issue)=>{
|
|
53504
|
-
let s = `${name} is not supported by
|
|
53505
|
-
if (issue) s += `
|
|
53503
|
+
let s = `${name} is not supported by Rspack.`;
|
|
53504
|
+
if (issue) s += ` Refer to issue ${issue} for more information.`;
|
|
53506
53505
|
throw new Error(s);
|
|
53507
53506
|
};
|
|
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
|
+
}
|
|
53508
53513
|
const WINDOWS_ABS_PATH_REGEXP = /^[a-zA-Z]:[\\/]/;
|
|
53509
53514
|
const SEGMENTS_SPLIT_REGEXP = /([|!])/;
|
|
53510
53515
|
const WINDOWS_PATH_SEPARATOR_REGEXP = /\\/g;
|
|
@@ -55283,10 +55288,15 @@ const getSwcLoaderOptions = (options, _)=>{
|
|
|
55283
55288
|
options.jsc ??= {};
|
|
55284
55289
|
options.jsc.experimental ??= {};
|
|
55285
55290
|
options.jsc.experimental.disableAllLints ??= true;
|
|
55291
|
+
if (options.collectTypeScriptInfo) options.collectTypeScriptInfo = resolveCollectTypeScriptInfo(options.collectTypeScriptInfo);
|
|
55286
55292
|
const { rspackExperiments } = options;
|
|
55287
55293
|
if (rspackExperiments) {
|
|
55288
55294
|
if (rspackExperiments.import || rspackExperiments.pluginImport) rspackExperiments.import = resolvePluginImport(rspackExperiments.import || rspackExperiments.pluginImport);
|
|
55289
|
-
if (rspackExperiments.collectTypeScriptInfo)
|
|
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
|
+
}
|
|
55290
55300
|
}
|
|
55291
55301
|
}
|
|
55292
55302
|
return options;
|
|
@@ -55725,6 +55735,7 @@ function getRawGeneratorOptions(generator, type) {
|
|
|
55725
55735
|
};
|
|
55726
55736
|
if ([
|
|
55727
55737
|
"asset/source",
|
|
55738
|
+
"asset/bytes",
|
|
55728
55739
|
"javascript",
|
|
55729
55740
|
"javascript/auto",
|
|
55730
55741
|
"javascript/dynamic",
|
|
@@ -56358,23 +56369,9 @@ const lazyCompilationMiddleware = (compiler)=>{
|
|
|
56358
56369
|
if (compiler instanceof MultiCompiler) {
|
|
56359
56370
|
const middlewareByCompiler = new Map();
|
|
56360
56371
|
let i = 0;
|
|
56361
|
-
let isReportDeprecatedWarned = false;
|
|
56362
|
-
let isReportRepeatWarned = false;
|
|
56363
56372
|
for (const c of compiler.compilers){
|
|
56364
|
-
if (c.options.experiments.lazyCompilation) {
|
|
56365
|
-
|
|
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
|
-
}
|
|
56373
|
+
if (c.options.experiments.lazyCompilation) c.name ? deprecate(`The 'experiments.lazyCompilation' option in compiler named '${c.name}' is deprecated, please use the Configuration top level 'lazyCompilation' instead.`) : deprecate(DEPRECATED_LAZY_COMPILATION_OPTIONS_WARN);
|
|
56374
|
+
if (c.options.lazyCompilation && c.options.experiments.lazyCompilation) c.name ? deprecate(`The top-level 'lazyCompilation' option in compiler named '${c.name}' will override the 'experiments.lazyCompilation' option.`) : deprecate(REPEAT_LAZY_COMPILATION_OPTIONS_WARN);
|
|
56378
56375
|
if (!c.options.lazyCompilation && !c.options.experiments.lazyCompilation) continue;
|
|
56379
56376
|
const options = {
|
|
56380
56377
|
...c.options.experiments.lazyCompilation,
|
|
@@ -56397,8 +56394,8 @@ const lazyCompilationMiddleware = (compiler)=>{
|
|
|
56397
56394
|
};
|
|
56398
56395
|
}
|
|
56399
56396
|
if (compiler.options.experiments.lazyCompilation) {
|
|
56400
|
-
|
|
56401
|
-
if (compiler.options.lazyCompilation)
|
|
56397
|
+
deprecate(DEPRECATED_LAZY_COMPILATION_OPTIONS_WARN);
|
|
56398
|
+
if (compiler.options.lazyCompilation) deprecate(REPEAT_LAZY_COMPILATION_OPTIONS_WARN);
|
|
56402
56399
|
}
|
|
56403
56400
|
if (!compiler.options.lazyCompilation && !compiler.options.experiments.lazyCompilation) return noop;
|
|
56404
56401
|
const activeModules = new Set();
|
|
@@ -56686,238 +56683,6 @@ const createRuntimePluginHooksRegisters = (getCompiler, createTap)=>({
|
|
|
56686
56683
|
};
|
|
56687
56684
|
})
|
|
56688
56685
|
});
|
|
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
|
-
};
|
|
56921
56686
|
const SideEffectsFlagPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.SideEffectsFlagPlugin, ()=>{}, "compilation");
|
|
56922
56687
|
const SizeLimitsPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.SizeLimitsPlugin, (options)=>{
|
|
56923
56688
|
const hints = false === options.hints ? void 0 : options.hints;
|
|
@@ -57246,7 +57011,6 @@ const SwcJsMinimizerRspackPlugin = base_create(external_rspack_wasi_browser_js_.
|
|
|
57246
57011
|
};
|
|
57247
57012
|
}, "compilation");
|
|
57248
57013
|
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");
|
|
57250
57014
|
function WebWorkerTemplatePlugin_define_property(obj, key, value) {
|
|
57251
57015
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
57252
57016
|
value: value,
|
|
@@ -58402,6 +58166,16 @@ const applyRspackOptionsDefaults = (options)=>{
|
|
|
58402
58166
|
css: options.experiments.css
|
|
58403
58167
|
}), options.resolve);
|
|
58404
58168
|
options.resolveLoader = cleverMerge(getResolveLoaderDefaults(), options.resolveLoader);
|
|
58169
|
+
return {
|
|
58170
|
+
platform: false === targetProperties ? targetProperties : {
|
|
58171
|
+
web: targetProperties.web,
|
|
58172
|
+
browser: targetProperties.browser,
|
|
58173
|
+
webworker: targetProperties.webworker,
|
|
58174
|
+
node: targetProperties.node,
|
|
58175
|
+
nwjs: targetProperties.nwjs,
|
|
58176
|
+
electron: targetProperties.electron
|
|
58177
|
+
}
|
|
58178
|
+
};
|
|
58405
58179
|
};
|
|
58406
58180
|
const applyRspackOptionsBaseDefaults = (options)=>{
|
|
58407
58181
|
F(options, "context", ()=>defaults_process.cwd());
|
|
@@ -58456,7 +58230,7 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
|
58456
58230
|
if ("object" == typeof rspackFuture) {
|
|
58457
58231
|
D(rspackFuture, "bundlerInfo", {});
|
|
58458
58232
|
if ("object" == typeof rspackFuture.bundlerInfo) {
|
|
58459
|
-
D(rspackFuture.bundlerInfo, "version", "1.7.0-canary-
|
|
58233
|
+
D(rspackFuture.bundlerInfo, "version", "1.7.0-canary-08772c3f-20251224173339");
|
|
58460
58234
|
D(rspackFuture.bundlerInfo, "bundler", "rspack");
|
|
58461
58235
|
D(rspackFuture.bundlerInfo, "force", !library);
|
|
58462
58236
|
}
|
|
@@ -58663,6 +58437,11 @@ const applyModuleDefaults = (module1, { cache, asyncWebAssembly, css, targetProp
|
|
|
58663
58437
|
type: "text"
|
|
58664
58438
|
},
|
|
58665
58439
|
type: "asset/source"
|
|
58440
|
+
}, {
|
|
58441
|
+
with: {
|
|
58442
|
+
type: "bytes"
|
|
58443
|
+
},
|
|
58444
|
+
type: "asset/bytes"
|
|
58666
58445
|
});
|
|
58667
58446
|
return rules;
|
|
58668
58447
|
});
|
|
@@ -59174,7 +58953,7 @@ const getNormalizedRspackOptions = (config)=>({
|
|
|
59174
58953
|
main: {}
|
|
59175
58954
|
} : "function" == typeof config.entry ? ((fn)=>()=>Promise.resolve().then(fn).then(getNormalizedEntryStatic))(config.entry) : getNormalizedEntryStatic(config.entry),
|
|
59176
58955
|
output: nestedConfig(config.output, (output)=>{
|
|
59177
|
-
if ("cssHeadDataCompression" in output)
|
|
58956
|
+
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");
|
|
59178
58957
|
const { library } = output;
|
|
59179
58958
|
const libraryAsName = library;
|
|
59180
58959
|
const libraryBase = "object" == typeof library && library && !Array.isArray(library) && "type" in library ? library : libraryAsName || output.libraryTarget ? {
|
|
@@ -59325,12 +59104,12 @@ const getNormalizedRspackOptions = (config)=>({
|
|
|
59325
59104
|
...p
|
|
59326
59105
|
]),
|
|
59327
59106
|
experiments: nestedConfig(config.experiments, (experiments)=>{
|
|
59328
|
-
if (experiments.layers)
|
|
59329
|
-
if (false === experiments.topLevelAwait)
|
|
59330
|
-
if (experiments.lazyBarrel)
|
|
59331
|
-
if (experiments.inlineConst)
|
|
59332
|
-
if (experiments.inlineEnum)
|
|
59333
|
-
if (experiments.typeReexportsPresence)
|
|
59107
|
+
if (experiments.layers) deprecate("`experiments.layers` config is deprecated and will be removed in Rspack v2.0. Feature layers will always be enabled. Remove this option from your Rspack configuration.");
|
|
59108
|
+
if (false === experiments.topLevelAwait) deprecate("`experiments.topLevelAwait` config is deprecated and will be removed in Rspack v2.0. Top-level await will always be enabled. Remove this option from your Rspack configuration.");
|
|
59109
|
+
if (experiments.lazyBarrel) deprecate("`experiments.lazyBarrel` config is deprecated and will be removed in Rspack v2.0. Lazy barrel is already stable and enabled by default. Remove this option from your Rspack configuration.");
|
|
59110
|
+
if (experiments.inlineConst) deprecate("`experiments.inlineConst` config is deprecated and will be removed in Rspack v2.0. Inline Const is already stable and enabled by default. Remove this option from your Rspack configuration.");
|
|
59111
|
+
if (experiments.inlineEnum) deprecate("`experiments.inlineEnum` config is deprecated and will be removed in Rspack v2.0. Inline Enum is already stable. Remove this option from your Rspack configuration.");
|
|
59112
|
+
if (experiments.typeReexportsPresence) deprecate("`experiments.typeReexportsPresence` config is deprecated and will be removed in Rspack v2.0. typeReexportsPresence is already stable. Remove this option from your Rspack configuration.");
|
|
59334
59113
|
return {
|
|
59335
59114
|
...experiments,
|
|
59336
59115
|
cache: optionalNestedConfig(experiments.cache, (cache)=>{
|
|
@@ -60525,13 +60304,13 @@ function Resolver_class_private_field_set(receiver, privateMap, value) {
|
|
|
60525
60304
|
Resolver_class_apply_descriptor_set(receiver, descriptor, value);
|
|
60526
60305
|
return value;
|
|
60527
60306
|
}
|
|
60528
|
-
var
|
|
60307
|
+
var _binding = /*#__PURE__*/ new WeakMap();
|
|
60529
60308
|
class Resolver {
|
|
60530
60309
|
resolveSync(_context, path, request) {
|
|
60531
|
-
return Resolver_class_private_field_get(this,
|
|
60310
|
+
return Resolver_class_private_field_get(this, _binding).resolveSync(path, request) ?? false;
|
|
60532
60311
|
}
|
|
60533
60312
|
resolve(_context, path, request, resolveContext, callback) {
|
|
60534
|
-
Resolver_class_private_field_get(this,
|
|
60313
|
+
Resolver_class_private_field_get(this, _binding).resolve(path, request, (error, text)=>{
|
|
60535
60314
|
if (error) return void callback(error);
|
|
60536
60315
|
const req = text ? JSON.parse(text) : void 0;
|
|
60537
60316
|
if (req?.fileDependencies) req.fileDependencies.forEach((file)=>{
|
|
@@ -60544,11 +60323,11 @@ class Resolver {
|
|
|
60544
60323
|
});
|
|
60545
60324
|
}
|
|
60546
60325
|
constructor(binding){
|
|
60547
|
-
Resolver_class_private_field_init(this,
|
|
60326
|
+
Resolver_class_private_field_init(this, _binding, {
|
|
60548
60327
|
writable: true,
|
|
60549
60328
|
value: void 0
|
|
60550
60329
|
});
|
|
60551
|
-
Resolver_class_private_field_set(this,
|
|
60330
|
+
Resolver_class_private_field_set(this, _binding, binding);
|
|
60552
60331
|
}
|
|
60553
60332
|
}
|
|
60554
60333
|
function ResolverFactory_check_private_redeclaration(obj, privateCollection) {
|
|
@@ -61725,24 +61504,24 @@ class Watching {
|
|
|
61725
61504
|
compilation.endTime = Date.now();
|
|
61726
61505
|
const cbs = this.callbacks;
|
|
61727
61506
|
this.callbacks = [];
|
|
61507
|
+
const fileDependencies = new Set([
|
|
61508
|
+
...compilation.fileDependencies
|
|
61509
|
+
]);
|
|
61510
|
+
fileDependencies.added = new Set(compilation.__internal__addedFileDependencies);
|
|
61511
|
+
fileDependencies.removed = new Set(compilation.__internal__removedFileDependencies);
|
|
61512
|
+
const contextDependencies = new Set([
|
|
61513
|
+
...compilation.contextDependencies
|
|
61514
|
+
]);
|
|
61515
|
+
contextDependencies.added = new Set(compilation.__internal__addedContextDependencies);
|
|
61516
|
+
contextDependencies.removed = new Set(compilation.__internal__removedContextDependencies);
|
|
61517
|
+
const missingDependencies = new Set([
|
|
61518
|
+
...compilation.missingDependencies
|
|
61519
|
+
]);
|
|
61520
|
+
missingDependencies.added = new Set(compilation.__internal__addedMissingDependencies);
|
|
61521
|
+
missingDependencies.removed = new Set(compilation.__internal__removedMissingDependencies);
|
|
61728
61522
|
this.compiler.hooks.done.callAsync(stats, (err)=>{
|
|
61729
61523
|
if (err) return handleError(err, cbs);
|
|
61730
61524
|
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);
|
|
61746
61525
|
Watching_process.nextTick(()=>{
|
|
61747
61526
|
if (!Watching_class_private_field_get(this, _closed)) this.watch(fileDependencies, contextDependencies, missingDependencies);
|
|
61748
61527
|
});
|
|
@@ -61948,8 +61727,7 @@ function Compiler_define_property(obj, key, value) {
|
|
|
61948
61727
|
return obj;
|
|
61949
61728
|
}
|
|
61950
61729
|
const COMPILATION_WEAK_MAP = new WeakMap();
|
|
61951
|
-
|
|
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();
|
|
61730
|
+
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(), _platform = /*#__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();
|
|
61953
61731
|
class Compiler {
|
|
61954
61732
|
get recordsInputPath() {
|
|
61955
61733
|
return unsupported("Compiler.recordsInputPath");
|
|
@@ -61966,6 +61744,12 @@ class Compiler {
|
|
|
61966
61744
|
get _lastCompilation() {
|
|
61967
61745
|
return Compiler_class_private_field_get(this, Compiler_compilation);
|
|
61968
61746
|
}
|
|
61747
|
+
get platform() {
|
|
61748
|
+
return Compiler_class_private_field_get(this, _platform);
|
|
61749
|
+
}
|
|
61750
|
+
set platform(platform) {
|
|
61751
|
+
Compiler_class_private_field_set(this, _platform, platform);
|
|
61752
|
+
}
|
|
61969
61753
|
get __internal__builtinPlugins() {
|
|
61970
61754
|
return Compiler_class_private_field_get(this, _builtinPlugins);
|
|
61971
61755
|
}
|
|
@@ -62290,6 +62074,10 @@ class Compiler {
|
|
|
62290
62074
|
Compiler_define_property(this, "context", void 0);
|
|
62291
62075
|
Compiler_define_property(this, "cache", void 0);
|
|
62292
62076
|
Compiler_define_property(this, "compilerPath", void 0);
|
|
62077
|
+
Compiler_class_private_field_init(this, _platform, {
|
|
62078
|
+
writable: true,
|
|
62079
|
+
value: void 0
|
|
62080
|
+
});
|
|
62293
62081
|
Compiler_define_property(this, "options", void 0);
|
|
62294
62082
|
Compiler_define_property(this, "unsafeFastDrop", false);
|
|
62295
62083
|
Compiler_define_property(this, "__internal_browser_require", void 0);
|
|
@@ -62408,18 +62196,20 @@ class Compiler {
|
|
|
62408
62196
|
this.running = false;
|
|
62409
62197
|
this.idle = false;
|
|
62410
62198
|
this.watchMode = false;
|
|
62199
|
+
Compiler_class_private_field_set(this, _platform, {
|
|
62200
|
+
web: null,
|
|
62201
|
+
browser: null,
|
|
62202
|
+
webworker: null,
|
|
62203
|
+
node: null,
|
|
62204
|
+
nwjs: null,
|
|
62205
|
+
electron: null
|
|
62206
|
+
});
|
|
62411
62207
|
this.__internal_browser_require = ()=>{
|
|
62412
62208
|
throw new Error("Cannot execute user defined code in browser without `BrowserRequirePlugin`");
|
|
62413
62209
|
};
|
|
62414
62210
|
this.resolverFactory = new ResolverFactory(options.resolve.pnp ?? getPnpDefault(), options.resolve, options.resolveLoader);
|
|
62415
62211
|
new JsLoaderRspackPlugin(this).apply(this);
|
|
62416
62212
|
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
|
-
});
|
|
62423
62213
|
}
|
|
62424
62214
|
}
|
|
62425
62215
|
function build(callback) {
|
|
@@ -62460,7 +62250,7 @@ function getInstance(callback) {
|
|
|
62460
62250
|
Compiler_class_private_field_set(this, _registers, Compiler_class_private_method_get(this, _createHooksRegisters, createHooksRegisters).call(this));
|
|
62461
62251
|
const inputFileSystem = this.inputFileSystem && ThreadsafeInputNodeFS.needsBinding(options.experiments.useInputFileSystem) ? ThreadsafeInputNodeFS.__to_binding(this.inputFileSystem) : void 0;
|
|
62462
62252
|
try {
|
|
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));
|
|
62253
|
+
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, Compiler_class_private_field_get(this, _platform)));
|
|
62464
62254
|
callback(null, Compiler_class_private_field_get(this, _instance));
|
|
62465
62255
|
} catch (err) {
|
|
62466
62256
|
if (err instanceof Error) delete err.stack;
|
|
@@ -62621,7 +62411,7 @@ class MultiStats {
|
|
|
62621
62411
|
return obj;
|
|
62622
62412
|
});
|
|
62623
62413
|
if (childOptions.version) {
|
|
62624
|
-
obj.rspackVersion = "1.7.0-canary-
|
|
62414
|
+
obj.rspackVersion = "1.7.0-canary-08772c3f-20251224173339";
|
|
62625
62415
|
obj.version = "5.75.0";
|
|
62626
62416
|
}
|
|
62627
62417
|
if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join("");
|
|
@@ -63937,7 +63727,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
63937
63727
|
},
|
|
63938
63728
|
version: (object)=>{
|
|
63939
63729
|
object.version = "5.75.0";
|
|
63940
|
-
object.rspackVersion = "1.7.0-canary-
|
|
63730
|
+
object.rspackVersion = "1.7.0-canary-08772c3f-20251224173339";
|
|
63941
63731
|
},
|
|
63942
63732
|
env: (object, _compilation, _context, { _env })=>{
|
|
63943
63733
|
object.env = _env;
|
|
@@ -67074,7 +66864,7 @@ function transformSync(source, options) {
|
|
|
67074
66864
|
const _options = JSON.stringify(options || {});
|
|
67075
66865
|
return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
|
|
67076
66866
|
}
|
|
67077
|
-
const exports_rspackVersion = "1.7.0-canary-
|
|
66867
|
+
const exports_rspackVersion = "1.7.0-canary-08772c3f-20251224173339";
|
|
67078
66868
|
const exports_version = "5.75.0";
|
|
67079
66869
|
const exports_WebpackError = Error;
|
|
67080
66870
|
const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
|
|
@@ -67162,9 +66952,7 @@ const exports_experiments = {
|
|
|
67162
66952
|
},
|
|
67163
66953
|
CssChunkingPlugin: CssChunkingPlugin,
|
|
67164
66954
|
createNativePlugin: createNativePlugin,
|
|
67165
|
-
VirtualModulesPlugin: VirtualModulesPlugin
|
|
67166
|
-
createRscPlugins: createRscPlugins,
|
|
67167
|
-
RSC_LAYERS_NAMES: RSC_LAYERS_NAMES
|
|
66955
|
+
VirtualModulesPlugin: VirtualModulesPlugin
|
|
67168
66956
|
};
|
|
67169
66957
|
const ERROR_PREFIX = "Invalid Rspack configuration:";
|
|
67170
66958
|
const validateContext = ({ context })=>{
|
|
@@ -67225,7 +67013,8 @@ function createCompiler(userOptions) {
|
|
|
67225
67013
|
for (const plugin of options.plugins)if ("function" == typeof plugin) plugin.call(compiler, compiler);
|
|
67226
67014
|
else if (plugin) plugin.apply(compiler);
|
|
67227
67015
|
}
|
|
67228
|
-
applyRspackOptionsDefaults(compiler.options);
|
|
67016
|
+
const { platform } = applyRspackOptionsDefaults(compiler.options);
|
|
67017
|
+
if (platform) compiler.platform = platform;
|
|
67229
67018
|
compiler.hooks.environment.call();
|
|
67230
67019
|
compiler.hooks.afterEnvironment.call();
|
|
67231
67020
|
new RspackOptionsApply().process(compiler.options, compiler);
|
|
@@ -67281,7 +67070,7 @@ function rspack(options, callback) {
|
|
|
67281
67070
|
}
|
|
67282
67071
|
{
|
|
67283
67072
|
const { compiler, watch } = create();
|
|
67284
|
-
if (watch)
|
|
67073
|
+
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.");
|
|
67285
67074
|
return compiler;
|
|
67286
67075
|
}
|
|
67287
67076
|
}
|
|
@@ -67487,4 +67276,4 @@ var __webpack_exports__EntryDependency = external_rspack_wasi_browser_js_.EntryD
|
|
|
67487
67276
|
var __webpack_exports__ExternalModule = external_rspack_wasi_browser_js_.ExternalModule;
|
|
67488
67277
|
var __webpack_exports__Module = external_rspack_wasi_browser_js_.Module;
|
|
67489
67278
|
var __webpack_exports__NormalModule = external_rspack_wasi_browser_js_.NormalModule;
|
|
67490
|
-
export { BannerPlugin, BrowserHttpImportEsmPlugin, BrowserRequirePlugin, CircularDependencyRspackPlugin, Compilation, Compiler, ContextReplacementPlugin,
|
|
67279
|
+
export { BannerPlugin, BrowserHttpImportEsmPlugin, BrowserRequirePlugin, CaseSensitivePlugin, 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, CaseSensitivePlugin as 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,8 +95,6 @@ export interface JsSource {
|
|
|
95
95
|
source: string | Buffer
|
|
96
96
|
map?: string
|
|
97
97
|
}
|
|
98
|
-
|
|
99
|
-
export type CompilerId = void;
|
|
100
98
|
/* -- banner.d.ts end -- */
|
|
101
99
|
|
|
102
100
|
/* -- napi-rs generated below -- */
|
|
@@ -328,7 +326,7 @@ export declare class JsCompilation {
|
|
|
328
326
|
}
|
|
329
327
|
|
|
330
328
|
export declare class JsCompiler {
|
|
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)
|
|
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, platform: RawCompilerPlatform)
|
|
332
330
|
setNonSkippableRegisters(kinds: Array<RegisterJsTapKind>): void
|
|
333
331
|
/** Build with the given option passed to the constructor */
|
|
334
332
|
build(callback: (err: null | Error) => void): void
|
|
@@ -336,7 +334,6 @@ export declare class JsCompiler {
|
|
|
336
334
|
rebuild(changed_files: string[], removed_files: string[], callback: (err: null | Error) => void): void
|
|
337
335
|
close(): Promise<void>
|
|
338
336
|
getVirtualFileStore(): VirtualFileStore | null
|
|
339
|
-
getCompilerId(): ExternalObject<CompilerId>
|
|
340
337
|
}
|
|
341
338
|
|
|
342
339
|
export declare class JsContextModuleFactoryAfterResolveData {
|
|
@@ -364,10 +361,6 @@ export declare class JsContextModuleFactoryBeforeResolveData {
|
|
|
364
361
|
set recursive(recursive: boolean)
|
|
365
362
|
}
|
|
366
363
|
|
|
367
|
-
export declare class JsCoordinator {
|
|
368
|
-
constructor(getServerCompilerIdJsFn: () => ExternalObject<CompilerId>)
|
|
369
|
-
}
|
|
370
|
-
|
|
371
364
|
export declare class JsDependencies {
|
|
372
365
|
get fileDependencies(): Array<string>
|
|
373
366
|
get addedFileDependencies(): Array<string>
|
|
@@ -563,7 +556,7 @@ export declare enum BuiltinPluginName {
|
|
|
563
556
|
RealContentHashPlugin = 'RealContentHashPlugin',
|
|
564
557
|
RemoveEmptyChunksPlugin = 'RemoveEmptyChunksPlugin',
|
|
565
558
|
EnsureChunkConditionsPlugin = 'EnsureChunkConditionsPlugin',
|
|
566
|
-
|
|
559
|
+
CaseSensitivePlugin = 'CaseSensitivePlugin',
|
|
567
560
|
DataUriPlugin = 'DataUriPlugin',
|
|
568
561
|
FileUriPlugin = 'FileUriPlugin',
|
|
569
562
|
RuntimePlugin = 'RuntimePlugin',
|
|
@@ -609,9 +602,7 @@ export declare enum BuiltinPluginName {
|
|
|
609
602
|
LazyCompilationPlugin = 'LazyCompilationPlugin',
|
|
610
603
|
ModuleInfoHeaderPlugin = 'ModuleInfoHeaderPlugin',
|
|
611
604
|
HttpUriPlugin = 'HttpUriPlugin',
|
|
612
|
-
CssChunkingPlugin = 'CssChunkingPlugin'
|
|
613
|
-
RscServerPlugin = 'RscServerPlugin',
|
|
614
|
-
RscClientPlugin = 'RscClientPlugin'
|
|
605
|
+
CssChunkingPlugin = 'CssChunkingPlugin'
|
|
615
606
|
}
|
|
616
607
|
|
|
617
608
|
export declare function cleanupGlobalTrace(): void
|
|
@@ -1847,6 +1838,15 @@ export interface RawCircularDependencyRspackPluginOptions {
|
|
|
1847
1838
|
onEnd?: () => void
|
|
1848
1839
|
}
|
|
1849
1840
|
|
|
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,3 +1,12 @@
|
|
|
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
|
+
*/
|
|
1
10
|
import type { Callback } from "@rspack/lite-tapable";
|
|
2
11
|
import { Compiler } from "./Compiler";
|
|
3
12
|
import { type RspackOptions } from "./config";
|
|
@@ -85,7 +85,6 @@ 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
|
|
89
88
|
export const JsDependencies = __napiModule.exports.JsDependencies
|
|
90
89
|
export const JsEntries = __napiModule.exports.JsEntries
|
|
91
90
|
export const JsExportsInfo = __napiModule.exports.JsExportsInfo
|
|
Binary file
|
package/dist/util/index.d.ts
CHANGED
|
@@ -6,3 +6,4 @@ 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-08772c3f-20251224173339",
|
|
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.",
|
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
};
|