@rspack-canary/browser 1.6.7-canary-e27a87e9-20251209100543 → 1.6.7-canary-f7e6adf4-20251211131042
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.
|
@@ -8,6 +8,7 @@ export interface ModuleFederationPluginOptions extends Omit<ModuleFederationPlug
|
|
|
8
8
|
shareStrategy?: "version-first" | "loaded-first";
|
|
9
9
|
injectUsedExports?: boolean;
|
|
10
10
|
independentShareDir?: string;
|
|
11
|
+
treeshakeSharedExcludedPlugins?: string[];
|
|
11
12
|
manifest?: ModuleFederationManifestPluginOptions;
|
|
12
13
|
}
|
|
13
14
|
export type RuntimePlugins = string[] | [string, Record<string, unknown>][];
|
package/dist/index.mjs
CHANGED
|
@@ -58190,7 +58190,7 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
|
58190
58190
|
if ("object" == typeof rspackFuture) {
|
|
58191
58191
|
D(rspackFuture, "bundlerInfo", {});
|
|
58192
58192
|
if ("object" == typeof rspackFuture.bundlerInfo) {
|
|
58193
|
-
D(rspackFuture.bundlerInfo, "version", "1.6.7-canary-
|
|
58193
|
+
D(rspackFuture.bundlerInfo, "version", "1.6.7-canary-f7e6adf4-20251211131042");
|
|
58194
58194
|
D(rspackFuture.bundlerInfo, "bundler", "rspack");
|
|
58195
58195
|
D(rspackFuture.bundlerInfo, "force", !library);
|
|
58196
58196
|
}
|
|
@@ -62336,7 +62336,7 @@ class MultiStats {
|
|
|
62336
62336
|
return obj;
|
|
62337
62337
|
});
|
|
62338
62338
|
if (childOptions.version) {
|
|
62339
|
-
obj.rspackVersion = "1.6.7-canary-
|
|
62339
|
+
obj.rspackVersion = "1.6.7-canary-f7e6adf4-20251211131042";
|
|
62340
62340
|
obj.version = "5.75.0";
|
|
62341
62341
|
}
|
|
62342
62342
|
if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join("");
|
|
@@ -63641,7 +63641,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
63641
63641
|
},
|
|
63642
63642
|
version: (object)=>{
|
|
63643
63643
|
object.version = "5.75.0";
|
|
63644
|
-
object.rspackVersion = "1.6.7-canary-
|
|
63644
|
+
object.rspackVersion = "1.6.7-canary-f7e6adf4-20251211131042";
|
|
63645
63645
|
},
|
|
63646
63646
|
env: (object, _compilation, _context, { _env })=>{
|
|
63647
63647
|
object.env = _env;
|
|
@@ -66671,7 +66671,7 @@ function IndependentSharedPlugin_define_property(obj, key, value) {
|
|
|
66671
66671
|
}
|
|
66672
66672
|
const VIRTUAL_ENTRY = "./virtual-entry.js";
|
|
66673
66673
|
const VIRTUAL_ENTRY_NAME = "virtual-entry";
|
|
66674
|
-
const filterPlugin = (plugin)=>{
|
|
66674
|
+
const filterPlugin = (plugin, excludedPlugins = [])=>{
|
|
66675
66675
|
if (!plugin) return true;
|
|
66676
66676
|
const pluginName = plugin.name || plugin.constructor?.name;
|
|
66677
66677
|
if (!pluginName) return true;
|
|
@@ -66680,7 +66680,8 @@ const filterPlugin = (plugin)=>{
|
|
|
66680
66680
|
"IndependentSharedPlugin",
|
|
66681
66681
|
"ModuleFederationPlugin",
|
|
66682
66682
|
"SharedUsedExportsOptimizerPlugin",
|
|
66683
|
-
"HtmlWebpackPlugin"
|
|
66683
|
+
"HtmlWebpackPlugin",
|
|
66684
|
+
...excludedPlugins
|
|
66684
66685
|
].includes(pluginName);
|
|
66685
66686
|
};
|
|
66686
66687
|
class VirtualEntryPlugin {
|
|
@@ -66796,7 +66797,7 @@ class IndependentSharedPlugin {
|
|
|
66796
66797
|
console.log("✅ All independent packages have been compiled successfully");
|
|
66797
66798
|
}
|
|
66798
66799
|
async createIndependentCompiler(parentCompiler, extraOptions) {
|
|
66799
|
-
const { mfName, plugins, outputDir, sharedOptions, treeshake, library } = this;
|
|
66800
|
+
const { mfName, plugins, outputDir, sharedOptions, treeshake, library, treeshakeSharedExcludedPlugins } = this;
|
|
66800
66801
|
const outputDirWithShareName = resolveOutputDir(outputDir, extraOptions?.currentShare?.shareName || "");
|
|
66801
66802
|
const parentConfig = parentCompiler.options;
|
|
66802
66803
|
const finalPlugins = [];
|
|
@@ -66811,7 +66812,7 @@ class IndependentSharedPlugin {
|
|
|
66811
66812
|
shareScope: "default"
|
|
66812
66813
|
});
|
|
66813
66814
|
(parentConfig.plugins || []).forEach((plugin)=>{
|
|
66814
|
-
if (void 0 !== plugin && "string" != typeof plugin && filterPlugin(plugin)) finalPlugins.push(plugin);
|
|
66815
|
+
if (void 0 !== plugin && "string" != typeof plugin && filterPlugin(plugin, treeshakeSharedExcludedPlugins)) finalPlugins.push(plugin);
|
|
66815
66816
|
});
|
|
66816
66817
|
plugins.forEach((plugin)=>{
|
|
66817
66818
|
finalPlugins.push(plugin);
|
|
@@ -66887,8 +66888,9 @@ class IndependentSharedPlugin {
|
|
|
66887
66888
|
IndependentSharedPlugin_define_property(this, "manifest", void 0);
|
|
66888
66889
|
IndependentSharedPlugin_define_property(this, "buildAssets", {});
|
|
66889
66890
|
IndependentSharedPlugin_define_property(this, "injectUsedExports", void 0);
|
|
66891
|
+
IndependentSharedPlugin_define_property(this, "treeshakeSharedExcludedPlugins", void 0);
|
|
66890
66892
|
IndependentSharedPlugin_define_property(this, "name", "IndependentSharedPlugin");
|
|
66891
|
-
const { outputDir, plugins, treeshake, shared, name, manifest, injectUsedExports, library } = options;
|
|
66893
|
+
const { outputDir, plugins, treeshake, shared, name, manifest, injectUsedExports, library, treeshakeSharedExcludedPlugins } = options;
|
|
66892
66894
|
this.shared = shared;
|
|
66893
66895
|
this.mfName = name;
|
|
66894
66896
|
this.outputDir = outputDir || "independent-packages";
|
|
@@ -66897,6 +66899,7 @@ class IndependentSharedPlugin {
|
|
|
66897
66899
|
this.manifest = manifest;
|
|
66898
66900
|
this.injectUsedExports = injectUsedExports ?? true;
|
|
66899
66901
|
this.library = library;
|
|
66902
|
+
this.treeshakeSharedExcludedPlugins = treeshakeSharedExcludedPlugins || [];
|
|
66900
66903
|
this.sharedOptions = parseOptions(shared, (item, key)=>{
|
|
66901
66904
|
if ("string" != typeof item) throw new Error(`Unexpected array in shared configuration for key "${key}"`);
|
|
66902
66905
|
const config = item !== key && isRequiredVersion(item) ? {
|
|
@@ -66935,7 +66938,8 @@ class TreeShakeSharedPlugin {
|
|
|
66935
66938
|
plugins,
|
|
66936
66939
|
treeshake: reshake,
|
|
66937
66940
|
library,
|
|
66938
|
-
manifest: mfConfig.manifest
|
|
66941
|
+
manifest: mfConfig.manifest,
|
|
66942
|
+
treeshakeSharedExcludedPlugins: mfConfig.treeshakeSharedExcludedPlugins
|
|
66939
66943
|
});
|
|
66940
66944
|
this._independentSharePlugin.apply(compiler);
|
|
66941
66945
|
}
|
|
@@ -67295,7 +67299,7 @@ function transformSync(source, options) {
|
|
|
67295
67299
|
const _options = JSON.stringify(options || {});
|
|
67296
67300
|
return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
|
|
67297
67301
|
}
|
|
67298
|
-
const exports_rspackVersion = "1.6.7-canary-
|
|
67302
|
+
const exports_rspackVersion = "1.6.7-canary-f7e6adf4-20251211131042";
|
|
67299
67303
|
const exports_version = "5.75.0";
|
|
67300
67304
|
const exports_WebpackError = Error;
|
|
67301
67305
|
const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
|
|
Binary file
|
|
@@ -12,6 +12,7 @@ export interface IndependentSharePluginOptions {
|
|
|
12
12
|
treeshake?: boolean;
|
|
13
13
|
manifest?: ModuleFederationManifestPluginOptions;
|
|
14
14
|
injectUsedExports?: boolean;
|
|
15
|
+
treeshakeSharedExcludedPlugins?: string[];
|
|
15
16
|
}
|
|
16
17
|
export type ShareFallback = Record<string, [string, string, string][]>;
|
|
17
18
|
export declare class IndependentSharedPlugin {
|
|
@@ -25,6 +26,7 @@ export declare class IndependentSharedPlugin {
|
|
|
25
26
|
manifest?: ModuleFederationManifestPluginOptions;
|
|
26
27
|
buildAssets: ShareFallback;
|
|
27
28
|
injectUsedExports?: boolean;
|
|
29
|
+
treeshakeSharedExcludedPlugins?: string[];
|
|
28
30
|
name: string;
|
|
29
31
|
constructor(options: IndependentSharePluginOptions);
|
|
30
32
|
apply(compiler: Compiler): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack-canary/browser",
|
|
3
|
-
"version": "1.6.7-canary-
|
|
3
|
+
"version": "1.6.7-canary-f7e6adf4-20251211131042",
|
|
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.",
|