@rspack-canary/browser 1.7.0-canary-dcc2f8c9-20251223064055 → 1.7.0-canary-e20de023-20251223174329
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 -0
- package/dist/builtin-loader/swc/types.d.ts +6 -0
- package/dist/builtin-plugin/{WarnCaseSensitiveModulesPlugin.d.ts → CaseSensitivePlugin.d.ts} +1 -1
- package/dist/builtin-plugin/index.d.ts +1 -1
- package/dist/config/defaults.d.ts +10 -1
- package/dist/config/target.d.ts +6 -6
- package/dist/container/ModuleFederationPlugin.d.ts +0 -2
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +0 -4
- package/dist/exports.d.ts +5 -1
- package/dist/index.mjs +52 -35
- package/dist/napi-binding.d.ts +11 -7
- package/dist/rspack.wasm32-wasi.wasm +0 -0
- package/package.json +1 -1
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";
|
|
@@ -126,6 +127,8 @@ declare class Compiler {
|
|
|
126
127
|
get managedPaths(): never;
|
|
127
128
|
get immutablePaths(): never;
|
|
128
129
|
get _lastCompilation(): Compilation | undefined;
|
|
130
|
+
get platform(): PlatformTargetProperties;
|
|
131
|
+
set platform(platform: PlatformTargetProperties);
|
|
129
132
|
/**
|
|
130
133
|
* Note: This is not a webpack public API, maybe removed in future.
|
|
131
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,6 +22,7 @@ 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
|
*/
|
|
@@ -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";
|
|
@@ -79,6 +80,5 @@ export * from "./SplitChunksPlugin";
|
|
|
79
80
|
export * from "./SubresourceIntegrityPlugin";
|
|
80
81
|
export * from "./SwcJsMinimizerPlugin";
|
|
81
82
|
export * from "./URLPlugin";
|
|
82
|
-
export * from "./WarnCaseSensitiveModulesPlugin";
|
|
83
83
|
export * from "./WebWorkerTemplatePlugin";
|
|
84
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 */
|
|
@@ -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
|
@@ -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";
|
package/dist/index.mjs
CHANGED
|
@@ -50562,6 +50562,7 @@ __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,
|
|
@@ -50609,7 +50610,7 @@ __webpack_require__.d(exports_namespaceObject, {
|
|
|
50609
50610
|
SwcJsMinimizerRspackPlugin: ()=>SwcJsMinimizerRspackPlugin,
|
|
50610
50611
|
Template: ()=>Template,
|
|
50611
50612
|
ValidationError: ()=>ValidationError,
|
|
50612
|
-
WarnCaseSensitiveModulesPlugin: ()=>
|
|
50613
|
+
WarnCaseSensitiveModulesPlugin: ()=>CaseSensitivePlugin,
|
|
50613
50614
|
WebpackError: ()=>exports_WebpackError,
|
|
50614
50615
|
WebpackOptionsApply: ()=>RspackOptionsApply,
|
|
50615
50616
|
config: ()=>exports_config,
|
|
@@ -52990,6 +52991,7 @@ const BundlerInfoRspackPlugin = base_create(external_rspack_wasi_browser_js_.Bui
|
|
|
52990
52991
|
bundler: options.bundler || "rspack",
|
|
52991
52992
|
force: options.force ?? true
|
|
52992
52993
|
}));
|
|
52994
|
+
const CaseSensitivePlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.CaseSensitivePlugin, ()=>{}, "compilation");
|
|
52993
52995
|
const ChunkPrefetchPreloadPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.ChunkPrefetchPreloadPlugin, ()=>{});
|
|
52994
52996
|
function CircularDependencyRspackPlugin_define_property(obj, key, value) {
|
|
52995
52997
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
@@ -55286,10 +55288,15 @@ const getSwcLoaderOptions = (options, _)=>{
|
|
|
55286
55288
|
options.jsc ??= {};
|
|
55287
55289
|
options.jsc.experimental ??= {};
|
|
55288
55290
|
options.jsc.experimental.disableAllLints ??= true;
|
|
55291
|
+
if (options.collectTypeScriptInfo) options.collectTypeScriptInfo = resolveCollectTypeScriptInfo(options.collectTypeScriptInfo);
|
|
55289
55292
|
const { rspackExperiments } = options;
|
|
55290
55293
|
if (rspackExperiments) {
|
|
55291
55294
|
if (rspackExperiments.import || rspackExperiments.pluginImport) rspackExperiments.import = resolvePluginImport(rspackExperiments.import || rspackExperiments.pluginImport);
|
|
55292
|
-
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
|
+
}
|
|
55293
55300
|
}
|
|
55294
55301
|
}
|
|
55295
55302
|
return options;
|
|
@@ -57003,7 +57010,6 @@ const SwcJsMinimizerRspackPlugin = base_create(external_rspack_wasi_browser_js_.
|
|
|
57003
57010
|
};
|
|
57004
57011
|
}, "compilation");
|
|
57005
57012
|
const URLPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.URLPlugin, ()=>{}, "compilation");
|
|
57006
|
-
const WarnCaseSensitiveModulesPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.WarnCaseSensitiveModulesPlugin, ()=>{}, "compilation");
|
|
57007
57013
|
function WebWorkerTemplatePlugin_define_property(obj, key, value) {
|
|
57008
57014
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
57009
57015
|
value: value,
|
|
@@ -58159,6 +58165,16 @@ const applyRspackOptionsDefaults = (options)=>{
|
|
|
58159
58165
|
css: options.experiments.css
|
|
58160
58166
|
}), options.resolve);
|
|
58161
58167
|
options.resolveLoader = cleverMerge(getResolveLoaderDefaults(), options.resolveLoader);
|
|
58168
|
+
return {
|
|
58169
|
+
platform: false === targetProperties ? targetProperties : {
|
|
58170
|
+
web: targetProperties.web,
|
|
58171
|
+
browser: targetProperties.browser,
|
|
58172
|
+
webworker: targetProperties.webworker,
|
|
58173
|
+
node: targetProperties.node,
|
|
58174
|
+
nwjs: targetProperties.nwjs,
|
|
58175
|
+
electron: targetProperties.electron
|
|
58176
|
+
}
|
|
58177
|
+
};
|
|
58162
58178
|
};
|
|
58163
58179
|
const applyRspackOptionsBaseDefaults = (options)=>{
|
|
58164
58180
|
F(options, "context", ()=>defaults_process.cwd());
|
|
@@ -58213,7 +58229,7 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
|
58213
58229
|
if ("object" == typeof rspackFuture) {
|
|
58214
58230
|
D(rspackFuture, "bundlerInfo", {});
|
|
58215
58231
|
if ("object" == typeof rspackFuture.bundlerInfo) {
|
|
58216
|
-
D(rspackFuture.bundlerInfo, "version", "1.7.0-canary-
|
|
58232
|
+
D(rspackFuture.bundlerInfo, "version", "1.7.0-canary-e20de023-20251223174329");
|
|
58217
58233
|
D(rspackFuture.bundlerInfo, "bundler", "rspack");
|
|
58218
58234
|
D(rspackFuture.bundlerInfo, "force", !library);
|
|
58219
58235
|
}
|
|
@@ -61705,7 +61721,7 @@ function Compiler_define_property(obj, key, value) {
|
|
|
61705
61721
|
return obj;
|
|
61706
61722
|
}
|
|
61707
61723
|
const COMPILATION_WEAK_MAP = new WeakMap();
|
|
61708
|
-
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();
|
|
61724
|
+
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();
|
|
61709
61725
|
class Compiler {
|
|
61710
61726
|
get recordsInputPath() {
|
|
61711
61727
|
return unsupported("Compiler.recordsInputPath");
|
|
@@ -61722,6 +61738,12 @@ class Compiler {
|
|
|
61722
61738
|
get _lastCompilation() {
|
|
61723
61739
|
return Compiler_class_private_field_get(this, Compiler_compilation);
|
|
61724
61740
|
}
|
|
61741
|
+
get platform() {
|
|
61742
|
+
return Compiler_class_private_field_get(this, _platform);
|
|
61743
|
+
}
|
|
61744
|
+
set platform(platform) {
|
|
61745
|
+
Compiler_class_private_field_set(this, _platform, platform);
|
|
61746
|
+
}
|
|
61725
61747
|
get __internal__builtinPlugins() {
|
|
61726
61748
|
return Compiler_class_private_field_get(this, _builtinPlugins);
|
|
61727
61749
|
}
|
|
@@ -62046,6 +62068,10 @@ class Compiler {
|
|
|
62046
62068
|
Compiler_define_property(this, "context", void 0);
|
|
62047
62069
|
Compiler_define_property(this, "cache", void 0);
|
|
62048
62070
|
Compiler_define_property(this, "compilerPath", void 0);
|
|
62071
|
+
Compiler_class_private_field_init(this, _platform, {
|
|
62072
|
+
writable: true,
|
|
62073
|
+
value: void 0
|
|
62074
|
+
});
|
|
62049
62075
|
Compiler_define_property(this, "options", void 0);
|
|
62050
62076
|
Compiler_define_property(this, "unsafeFastDrop", false);
|
|
62051
62077
|
Compiler_define_property(this, "__internal_browser_require", void 0);
|
|
@@ -62164,6 +62190,14 @@ class Compiler {
|
|
|
62164
62190
|
this.running = false;
|
|
62165
62191
|
this.idle = false;
|
|
62166
62192
|
this.watchMode = false;
|
|
62193
|
+
Compiler_class_private_field_set(this, _platform, {
|
|
62194
|
+
web: null,
|
|
62195
|
+
browser: null,
|
|
62196
|
+
webworker: null,
|
|
62197
|
+
node: null,
|
|
62198
|
+
nwjs: null,
|
|
62199
|
+
electron: null
|
|
62200
|
+
});
|
|
62167
62201
|
this.__internal_browser_require = ()=>{
|
|
62168
62202
|
throw new Error("Cannot execute user defined code in browser without `BrowserRequirePlugin`");
|
|
62169
62203
|
};
|
|
@@ -62210,7 +62244,7 @@ function getInstance(callback) {
|
|
|
62210
62244
|
Compiler_class_private_field_set(this, _registers, Compiler_class_private_method_get(this, _createHooksRegisters, createHooksRegisters).call(this));
|
|
62211
62245
|
const inputFileSystem = this.inputFileSystem && ThreadsafeInputNodeFS.needsBinding(options.experiments.useInputFileSystem) ? ThreadsafeInputNodeFS.__to_binding(this.inputFileSystem) : void 0;
|
|
62212
62246
|
try {
|
|
62213
|
-
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));
|
|
62247
|
+
Compiler_class_private_field_set(this, _instance, new instanceBinding.JsCompiler(this.compilerPath, rawOptions, Compiler_class_private_field_get(this, _builtinPlugins), Compiler_class_private_field_get(this, _registers), ThreadsafeOutputNodeFS.__to_binding(this.outputFileSystem), this.intermediateFileSystem ? ThreadsafeIntermediateNodeFS.__to_binding(this.intermediateFileSystem) : void 0, inputFileSystem, ResolverFactory.__to_binding(this.resolverFactory), this.unsafeFastDrop, Compiler_class_private_field_get(this, _platform)));
|
|
62214
62248
|
callback(null, Compiler_class_private_field_get(this, _instance));
|
|
62215
62249
|
} catch (err) {
|
|
62216
62250
|
if (err instanceof Error) delete err.stack;
|
|
@@ -62371,7 +62405,7 @@ class MultiStats {
|
|
|
62371
62405
|
return obj;
|
|
62372
62406
|
});
|
|
62373
62407
|
if (childOptions.version) {
|
|
62374
|
-
obj.rspackVersion = "1.7.0-canary-
|
|
62408
|
+
obj.rspackVersion = "1.7.0-canary-e20de023-20251223174329";
|
|
62375
62409
|
obj.version = "5.75.0";
|
|
62376
62410
|
}
|
|
62377
62411
|
if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join("");
|
|
@@ -63687,7 +63721,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
63687
63721
|
},
|
|
63688
63722
|
version: (object)=>{
|
|
63689
63723
|
object.version = "5.75.0";
|
|
63690
|
-
object.rspackVersion = "1.7.0-canary-
|
|
63724
|
+
object.rspackVersion = "1.7.0-canary-e20de023-20251223174329";
|
|
63691
63725
|
},
|
|
63692
63726
|
env: (object, _compilation, _context, { _env })=>{
|
|
63693
63727
|
object.env = _env;
|
|
@@ -66255,26 +66289,13 @@ class ModuleFederationPlugin {
|
|
|
66255
66289
|
...compiler.options.resolve.alias
|
|
66256
66290
|
};
|
|
66257
66291
|
const entryRuntime = getDefaultEntryRuntime(paths, this._options, compiler);
|
|
66258
|
-
const runtimeExperiments = {
|
|
66259
|
-
asyncStartup: this._options.experiments?.asyncStartup ?? false
|
|
66260
|
-
};
|
|
66261
66292
|
new ModuleFederationRuntimePlugin({
|
|
66262
|
-
entryRuntime
|
|
66263
|
-
experiments: runtimeExperiments
|
|
66293
|
+
entryRuntime
|
|
66264
66294
|
}).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,
|
|
66295
|
+
new webpack.container.ModuleFederationPluginV1({
|
|
66296
|
+
...this._options,
|
|
66275
66297
|
enhanced: true
|
|
66276
|
-
};
|
|
66277
|
-
new webpack.container.ModuleFederationPluginV1(v1Options).apply(compiler);
|
|
66298
|
+
}).apply(compiler);
|
|
66278
66299
|
if (this._options.manifest) {
|
|
66279
66300
|
const manifestOptions = true === this._options.manifest ? {} : {
|
|
66280
66301
|
...this._options.manifest
|
|
@@ -66734,19 +66755,14 @@ class ContainerReferencePlugin extends RspackBuiltinPlugin {
|
|
|
66734
66755
|
raw(compiler) {
|
|
66735
66756
|
const { remoteType, remotes } = this._options;
|
|
66736
66757
|
const remoteExternals = {};
|
|
66737
|
-
const importExternals = {};
|
|
66738
66758
|
for (const [key, config] of remotes){
|
|
66739
66759
|
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;
|
|
66760
|
+
for (const external of config.external)if (!external.startsWith("internal ")) {
|
|
66761
|
+
remoteExternals[`webpack/container/reference/${key}${i ? `/fallback-${i}` : ""}`] = external;
|
|
66745
66762
|
i++;
|
|
66746
66763
|
}
|
|
66747
66764
|
}
|
|
66748
66765
|
new ExternalsPlugin(remoteType, remoteExternals, true).apply(compiler);
|
|
66749
|
-
if (Object.keys(importExternals).length > 0) new ExternalsPlugin("import", importExternals, true).apply(compiler);
|
|
66750
66766
|
new ShareRuntimePlugin(this._options.enhanced).apply(compiler);
|
|
66751
66767
|
const rawOptions = {
|
|
66752
66768
|
remoteType: this._options.remoteType,
|
|
@@ -66842,7 +66858,7 @@ function transformSync(source, options) {
|
|
|
66842
66858
|
const _options = JSON.stringify(options || {});
|
|
66843
66859
|
return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
|
|
66844
66860
|
}
|
|
66845
|
-
const exports_rspackVersion = "1.7.0-canary-
|
|
66861
|
+
const exports_rspackVersion = "1.7.0-canary-e20de023-20251223174329";
|
|
66846
66862
|
const exports_version = "5.75.0";
|
|
66847
66863
|
const exports_WebpackError = Error;
|
|
66848
66864
|
const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
|
|
@@ -66991,7 +67007,8 @@ function createCompiler(userOptions) {
|
|
|
66991
67007
|
for (const plugin of options.plugins)if ("function" == typeof plugin) plugin.call(compiler, compiler);
|
|
66992
67008
|
else if (plugin) plugin.apply(compiler);
|
|
66993
67009
|
}
|
|
66994
|
-
applyRspackOptionsDefaults(compiler.options);
|
|
67010
|
+
const { platform } = applyRspackOptionsDefaults(compiler.options);
|
|
67011
|
+
if (platform) compiler.platform = platform;
|
|
66995
67012
|
compiler.hooks.environment.call();
|
|
66996
67013
|
compiler.hooks.afterEnvironment.call();
|
|
66997
67014
|
new RspackOptionsApply().process(compiler.options, compiler);
|
|
@@ -67253,4 +67270,4 @@ var __webpack_exports__EntryDependency = external_rspack_wasi_browser_js_.EntryD
|
|
|
67253
67270
|
var __webpack_exports__ExternalModule = external_rspack_wasi_browser_js_.ExternalModule;
|
|
67254
67271
|
var __webpack_exports__Module = external_rspack_wasi_browser_js_.Module;
|
|
67255
67272
|
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 };
|
|
67273
|
+
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
|
@@ -326,7 +326,7 @@ export declare class JsCompilation {
|
|
|
326
326
|
}
|
|
327
327
|
|
|
328
328
|
export declare class JsCompiler {
|
|
329
|
-
constructor(compilerPath: string, options: RawOptions, builtinPlugins: Array<BuiltinPlugin>, registerJsTaps: RegisterJsTaps, outputFilesystem: ThreadsafeNodeFS, intermediateFilesystem: ThreadsafeNodeFS | undefined | null, inputFilesystem: ThreadsafeNodeFS | undefined | null, resolverFactoryReference: JsResolverFactory, unsafeFastDrop: boolean)
|
|
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)
|
|
330
330
|
setNonSkippableRegisters(kinds: Array<RegisterJsTapKind>): void
|
|
331
331
|
/** Build with the given option passed to the constructor */
|
|
332
332
|
build(callback: (err: null | Error) => void): void
|
|
@@ -556,7 +556,7 @@ export declare enum BuiltinPluginName {
|
|
|
556
556
|
RealContentHashPlugin = 'RealContentHashPlugin',
|
|
557
557
|
RemoveEmptyChunksPlugin = 'RemoveEmptyChunksPlugin',
|
|
558
558
|
EnsureChunkConditionsPlugin = 'EnsureChunkConditionsPlugin',
|
|
559
|
-
|
|
559
|
+
CaseSensitivePlugin = 'CaseSensitivePlugin',
|
|
560
560
|
DataUriPlugin = 'DataUriPlugin',
|
|
561
561
|
FileUriPlugin = 'FileUriPlugin',
|
|
562
562
|
RuntimePlugin = 'RuntimePlugin',
|
|
@@ -1838,6 +1838,15 @@ export interface RawCircularDependencyRspackPluginOptions {
|
|
|
1838
1838
|
onEnd?: () => void
|
|
1839
1839
|
}
|
|
1840
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
|
+
|
|
1841
1850
|
export interface RawConsumeOptions {
|
|
1842
1851
|
key: string
|
|
1843
1852
|
import?: string
|
|
@@ -2462,13 +2471,8 @@ export interface RawModuleFederationManifestPluginOptions {
|
|
|
2462
2471
|
buildInfo?: RawStatsBuildInfo
|
|
2463
2472
|
}
|
|
2464
2473
|
|
|
2465
|
-
export interface RawModuleFederationRuntimeExperimentsOptions {
|
|
2466
|
-
asyncStartup?: boolean
|
|
2467
|
-
}
|
|
2468
|
-
|
|
2469
2474
|
export interface RawModuleFederationRuntimePluginOptions {
|
|
2470
2475
|
entryRuntime?: string | undefined
|
|
2471
|
-
experiments?: RawModuleFederationRuntimeExperimentsOptions
|
|
2472
2476
|
}
|
|
2473
2477
|
|
|
2474
2478
|
export interface RawModuleFilenameTemplateFnCtx {
|
|
Binary file
|
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-e20de023-20251223174329",
|
|
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.",
|