@module-federation/rspack 0.14.3 → 0.16.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.
@@ -202,7 +202,7 @@ var ModuleFederationPlugin = /*#__PURE__*/ function() {
202
202
  });
203
203
  if (!disableManifest) {
204
204
  this._statsPlugin = new manifest.StatsPlugin(options, {
205
- pluginVersion: "0.14.3",
205
+ pluginVersion: "0.16.0",
206
206
  bundler: 'rspack'
207
207
  });
208
208
  // @ts-ignore
@@ -295,6 +295,8 @@ var ModuleFederationPlugin = /*#__PURE__*/ function() {
295
295
  ]);
296
296
  return ModuleFederationPlugin;
297
297
  }();
298
+ var GetPublicPathPlugin = remoteEntryPlugin.RemoteEntryPlugin;
298
299
 
300
+ exports.GetPublicPathPlugin = GetPublicPathPlugin;
299
301
  exports.ModuleFederationPlugin = ModuleFederationPlugin;
300
302
  exports.PLUGIN_NAME = PLUGIN_NAME;
@@ -200,7 +200,7 @@ var ModuleFederationPlugin = /*#__PURE__*/ function() {
200
200
  });
201
201
  if (!disableManifest) {
202
202
  this._statsPlugin = new StatsPlugin(options, {
203
- pluginVersion: "0.14.3",
203
+ pluginVersion: "0.16.0",
204
204
  bundler: 'rspack'
205
205
  });
206
206
  // @ts-ignore
@@ -293,5 +293,6 @@ var ModuleFederationPlugin = /*#__PURE__*/ function() {
293
293
  ]);
294
294
  return ModuleFederationPlugin;
295
295
  }();
296
+ var GetPublicPathPlugin = RemoteEntryPlugin;
296
297
 
297
- export { ModuleFederationPlugin, PLUGIN_NAME };
298
+ export { GetPublicPathPlugin, ModuleFederationPlugin, PLUGIN_NAME };
@@ -22,6 +22,7 @@ function _defineProperties(target, props) {
22
22
  }
23
23
  function _create_class(Constructor, protoProps, staticProps) {
24
24
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
25
+ if (staticProps) _defineProperties(Constructor, staticProps);
25
26
  return Constructor;
26
27
  }
27
28
  function _define_property(obj, key, value) {
@@ -78,6 +79,13 @@ var RemoteEntryPlugin = /*#__PURE__*/ function() {
78
79
  logger.warn("Detect you don't set exposes, 'getPublicPath' will not have effect.");
79
80
  return;
80
81
  }
82
+ RemoteEntryPlugin.addPublicPathEntry(compiler, getPublicPath, name);
83
+ }
84
+ }
85
+ ], [
86
+ {
87
+ key: "addPublicPathEntry",
88
+ value: function addPublicPathEntry(compiler, getPublicPath, name) {
81
89
  var code;
82
90
  var sanitizedPublicPath = escapeUnsafeChars(getPublicPath);
83
91
  if (!getPublicPath.startsWith('function')) {
@@ -20,6 +20,7 @@ function _defineProperties(target, props) {
20
20
  }
21
21
  function _create_class(Constructor, protoProps, staticProps) {
22
22
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
23
+ if (staticProps) _defineProperties(Constructor, staticProps);
23
24
  return Constructor;
24
25
  }
25
26
  function _define_property(obj, key, value) {
@@ -76,6 +77,13 @@ var RemoteEntryPlugin = /*#__PURE__*/ function() {
76
77
  logger.warn("Detect you don't set exposes, 'getPublicPath' will not have effect.");
77
78
  return;
78
79
  }
80
+ RemoteEntryPlugin.addPublicPathEntry(compiler, getPublicPath, name);
81
+ }
82
+ }
83
+ ], [
84
+ {
85
+ key: "addPublicPathEntry",
86
+ value: function addPublicPathEntry(compiler, getPublicPath, name) {
79
87
  var code;
80
88
  var sanitizedPublicPath = escapeUnsafeChars(getPublicPath);
81
89
  if (!getPublicPath.startsWith('function')) {
@@ -1,5 +1,6 @@
1
1
  import type { Compiler, RspackPluginInstance } from '@rspack/core';
2
2
  import { moduleFederationPlugin } from '@module-federation/sdk';
3
+ import { RemoteEntryPlugin } from './RemoteEntryPlugin';
3
4
  export declare const PLUGIN_NAME = "RspackModuleFederationPlugin";
4
5
  export declare class ModuleFederationPlugin implements RspackPluginInstance {
5
6
  readonly name = "RspackModuleFederationPlugin";
@@ -12,3 +13,4 @@ export declare class ModuleFederationPlugin implements RspackPluginInstance {
12
13
  private _patchChunkSplit;
13
14
  get statsResourceInfo(): Partial<import("@module-federation/manifest").ResourceInfo> | undefined;
14
15
  }
16
+ export declare const GetPublicPathPlugin: typeof RemoteEntryPlugin;
@@ -4,5 +4,6 @@ export declare class RemoteEntryPlugin implements RspackPluginInstance {
4
4
  readonly name = "VmokRemoteEntryPlugin";
5
5
  _options: moduleFederationPlugin.ModuleFederationPluginOptions;
6
6
  constructor(options: moduleFederationPlugin.ModuleFederationPluginOptions);
7
+ static addPublicPathEntry(compiler: Compiler, getPublicPath: string, name: string): void;
7
8
  apply(compiler: Compiler): void;
8
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/rspack",
3
- "version": "0.14.3",
3
+ "version": "0.16.0",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "Module Federation",
@@ -25,13 +25,13 @@
25
25
  "types": "./dist/index.cjs.d.ts",
26
26
  "dependencies": {
27
27
  "btoa": "1.2.1",
28
- "@module-federation/bridge-react-webpack-plugin": "0.14.3",
29
- "@module-federation/dts-plugin": "0.14.3",
30
- "@module-federation/managers": "0.14.3",
31
- "@module-federation/manifest": "0.14.3",
32
- "@module-federation/runtime-tools": "0.14.3",
33
- "@module-federation/inject-external-runtime-core-plugin": "0.14.3",
34
- "@module-federation/sdk": "0.14.3"
28
+ "@module-federation/bridge-react-webpack-plugin": "0.16.0",
29
+ "@module-federation/dts-plugin": "0.16.0",
30
+ "@module-federation/managers": "0.16.0",
31
+ "@module-federation/manifest": "0.16.0",
32
+ "@module-federation/runtime-tools": "0.16.0",
33
+ "@module-federation/inject-external-runtime-core-plugin": "0.16.0",
34
+ "@module-federation/sdk": "0.16.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@rspack/core": "^1.0.2"