@module-federation/rspack 0.2.7 → 0.3.0

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/index.cjs.js CHANGED
@@ -104,6 +104,7 @@ var ModuleFederationPlugin = /*#__PURE__*/ function() {
104
104
  _class_call_check(this, ModuleFederationPlugin);
105
105
  _define_property(this, "name", 'RspackModuleFederationPlugin');
106
106
  _define_property(this, "_options", void 0);
107
+ _define_property(this, "_statsPlugin", void 0);
107
108
  this._options = options;
108
109
  }
109
110
  _create_class(ModuleFederationPlugin, [
@@ -172,10 +173,12 @@ var ModuleFederationPlugin = /*#__PURE__*/ function() {
172
173
  });
173
174
  });
174
175
  if (!disableManifest) {
175
- new manifest.StatsPlugin(options, {
176
- pluginVersion: "0.2.7",
176
+ this._statsPlugin = new manifest.StatsPlugin(options, {
177
+ pluginVersion: "0.3.0",
177
178
  bundler: 'rspack'
178
- }).apply(compiler);
179
+ });
180
+ // @ts-ignore
181
+ this._statsPlugin.apply(compiler);
179
182
  }
180
183
  // react bridge plugin
181
184
  var nodeModulesPath = path__default["default"].resolve(compiler.context, 'node_modules');
@@ -253,6 +256,13 @@ var ModuleFederationPlugin = /*#__PURE__*/ function() {
253
256
  patchChunkSplit(cacheGroups[cacheGroupKey]);
254
257
  });
255
258
  }
259
+ },
260
+ {
261
+ key: "statsResourceInfo",
262
+ get: function get() {
263
+ var _this__statsPlugin;
264
+ return (_this__statsPlugin = this._statsPlugin) === null || _this__statsPlugin === void 0 ? void 0 : _this__statsPlugin.resourceInfo;
265
+ }
256
266
  }
257
267
  ]);
258
268
  return ModuleFederationPlugin;
package/dist/index.esm.js CHANGED
@@ -94,6 +94,7 @@ var ModuleFederationPlugin = /*#__PURE__*/ function() {
94
94
  _class_call_check(this, ModuleFederationPlugin);
95
95
  _define_property(this, "name", 'RspackModuleFederationPlugin');
96
96
  _define_property(this, "_options", void 0);
97
+ _define_property(this, "_statsPlugin", void 0);
97
98
  this._options = options;
98
99
  }
99
100
  _create_class(ModuleFederationPlugin, [
@@ -162,10 +163,12 @@ var ModuleFederationPlugin = /*#__PURE__*/ function() {
162
163
  });
163
164
  });
164
165
  if (!disableManifest) {
165
- new StatsPlugin(options, {
166
- pluginVersion: "0.2.7",
166
+ this._statsPlugin = new StatsPlugin(options, {
167
+ pluginVersion: "0.3.0",
167
168
  bundler: 'rspack'
168
- }).apply(compiler);
169
+ });
170
+ // @ts-ignore
171
+ this._statsPlugin.apply(compiler);
169
172
  }
170
173
  // react bridge plugin
171
174
  var nodeModulesPath = path.resolve(compiler.context, 'node_modules');
@@ -243,6 +246,13 @@ var ModuleFederationPlugin = /*#__PURE__*/ function() {
243
246
  patchChunkSplit(cacheGroups[cacheGroupKey]);
244
247
  });
245
248
  }
249
+ },
250
+ {
251
+ key: "statsResourceInfo",
252
+ get: function get() {
253
+ var _this__statsPlugin;
254
+ return (_this__statsPlugin = this._statsPlugin) === null || _this__statsPlugin === void 0 ? void 0 : _this__statsPlugin.resourceInfo;
255
+ }
246
256
  }
247
257
  ]);
248
258
  return ModuleFederationPlugin;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/rspack",
3
- "version": "0.2.7",
3
+ "version": "0.3.0",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "Module Federation",
@@ -3,9 +3,11 @@ import { moduleFederationPlugin } from '@module-federation/sdk';
3
3
  export declare class ModuleFederationPlugin implements RspackPluginInstance {
4
4
  readonly name = "RspackModuleFederationPlugin";
5
5
  private _options;
6
+ private _statsPlugin?;
6
7
  constructor(options: moduleFederationPlugin.ModuleFederationPluginOptions);
7
8
  private _patchBundlerConfig;
8
9
  private _checkSingleton;
9
10
  apply(compiler: Compiler): void;
10
11
  private _patchChunkSplit;
12
+ get statsResourceInfo(): Partial<import("@module-federation/manifest").ResourceInfo> | undefined;
11
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/rspack",
3
- "version": "0.2.7",
3
+ "version": "0.3.0",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "Module Federation",
@@ -19,12 +19,12 @@
19
19
  "module": "./dist/index.esm.js",
20
20
  "types": "./dist/index.cjs.d.ts",
21
21
  "dependencies": {
22
- "@module-federation/sdk": "0.2.7",
23
- "@module-federation/bridge-react-webpack-plugin": "0.2.7",
24
- "@module-federation/runtime-tools": "0.2.7",
25
- "@module-federation/manifest": "0.2.7",
26
- "@module-federation/managers": "0.2.7",
27
- "@module-federation/dts-plugin": "0.2.7"
22
+ "@module-federation/sdk": "0.3.0",
23
+ "@module-federation/bridge-react-webpack-plugin": "0.3.0",
24
+ "@module-federation/runtime-tools": "0.3.0",
25
+ "@module-federation/manifest": "0.3.0",
26
+ "@module-federation/managers": "0.3.0",
27
+ "@module-federation/dts-plugin": "0.3.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@rspack/core": "0.5.0"