@module-federation/rsbuild-plugin 0.0.0-next-20241218093627 → 0.0.0-next-20241224050117
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 +3 -6
- package/dist/index.esm.js +4 -5
- package/dist/src/cli/index.d.ts +1 -3
- package/package.json +3 -3
package/dist/index.cjs.js
CHANGED
|
@@ -277,11 +277,10 @@ function _ts_generator(thisArg, body) {
|
|
|
277
277
|
};
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
|
-
var
|
|
281
|
-
var RSPACK_PLUGIN_MODULE_FEDERATION_NAME = 'module-federation';
|
|
280
|
+
var PLUGIN_MODULE_FEDERATION_NAME = 'rsbuild:module-federation-enhanced';
|
|
282
281
|
var pluginModuleFederation = function(moduleFederationOptions) {
|
|
283
282
|
return {
|
|
284
|
-
name:
|
|
283
|
+
name: PLUGIN_MODULE_FEDERATION_NAME,
|
|
285
284
|
setup: function(api) {
|
|
286
285
|
var sharedOptions = enhanced.parseOptions(moduleFederationOptions.shared || [], function(item, key) {
|
|
287
286
|
if (typeof item !== 'string') throw new Error('Unexpected array in shared');
|
|
@@ -410,7 +409,7 @@ var pluginModuleFederation = function(moduleFederationOptions) {
|
|
|
410
409
|
api.modifyBundlerChain(/*#__PURE__*/ function() {
|
|
411
410
|
var _ref = _async_to_generator(function(chain) {
|
|
412
411
|
return _ts_generator(this, function(_state) {
|
|
413
|
-
chain.plugin(
|
|
412
|
+
chain.plugin('module-federation').use(rspack.ModuleFederationPlugin, [
|
|
414
413
|
moduleFederationOptions
|
|
415
414
|
]);
|
|
416
415
|
// `uniqueName` is required for react refresh to work
|
|
@@ -430,6 +429,4 @@ var pluginModuleFederation = function(moduleFederationOptions) {
|
|
|
430
429
|
};
|
|
431
430
|
};
|
|
432
431
|
|
|
433
|
-
exports.RSBUILD_PLUGIN_MODULE_FEDERATION_NAME = RSBUILD_PLUGIN_MODULE_FEDERATION_NAME;
|
|
434
|
-
exports.RSPACK_PLUGIN_MODULE_FEDERATION_NAME = RSPACK_PLUGIN_MODULE_FEDERATION_NAME;
|
|
435
432
|
exports.pluginModuleFederation = pluginModuleFederation;
|
package/dist/index.esm.js
CHANGED
|
@@ -275,11 +275,10 @@ function _ts_generator(thisArg, body) {
|
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
|
-
var
|
|
279
|
-
var RSPACK_PLUGIN_MODULE_FEDERATION_NAME = 'module-federation';
|
|
278
|
+
var PLUGIN_MODULE_FEDERATION_NAME = 'rsbuild:module-federation-enhanced';
|
|
280
279
|
var pluginModuleFederation = function(moduleFederationOptions) {
|
|
281
280
|
return {
|
|
282
|
-
name:
|
|
281
|
+
name: PLUGIN_MODULE_FEDERATION_NAME,
|
|
283
282
|
setup: function(api) {
|
|
284
283
|
var sharedOptions = parseOptions(moduleFederationOptions.shared || [], function(item, key) {
|
|
285
284
|
if (typeof item !== 'string') throw new Error('Unexpected array in shared');
|
|
@@ -408,7 +407,7 @@ var pluginModuleFederation = function(moduleFederationOptions) {
|
|
|
408
407
|
api.modifyBundlerChain(/*#__PURE__*/ function() {
|
|
409
408
|
var _ref = _async_to_generator(function(chain) {
|
|
410
409
|
return _ts_generator(this, function(_state) {
|
|
411
|
-
chain.plugin(
|
|
410
|
+
chain.plugin('module-federation').use(ModuleFederationPlugin, [
|
|
412
411
|
moduleFederationOptions
|
|
413
412
|
]);
|
|
414
413
|
// `uniqueName` is required for react refresh to work
|
|
@@ -428,4 +427,4 @@ var pluginModuleFederation = function(moduleFederationOptions) {
|
|
|
428
427
|
};
|
|
429
428
|
};
|
|
430
429
|
|
|
431
|
-
export {
|
|
430
|
+
export { pluginModuleFederation };
|
package/dist/src/cli/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { moduleFederationPlugin } from '@module-federation/sdk';
|
|
2
2
|
import type { RsbuildPlugin } from '@rsbuild/core';
|
|
3
3
|
type ModuleFederationOptions = moduleFederationPlugin.ModuleFederationPluginOptions;
|
|
4
|
-
declare const RSBUILD_PLUGIN_MODULE_FEDERATION_NAME = "rsbuild:module-federation-enhanced";
|
|
5
|
-
declare const RSPACK_PLUGIN_MODULE_FEDERATION_NAME = "module-federation";
|
|
6
|
-
export { RSBUILD_PLUGIN_MODULE_FEDERATION_NAME, RSPACK_PLUGIN_MODULE_FEDERATION_NAME, };
|
|
7
4
|
export declare const pluginModuleFederation: (moduleFederationOptions: ModuleFederationOptions) => RsbuildPlugin;
|
|
5
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/rsbuild-plugin",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-20241224050117",
|
|
4
4
|
"description": "Module Federation plugin for Rsbuild",
|
|
5
5
|
"homepage": "https://module-federation.io",
|
|
6
6
|
"bugs": {
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"dist"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@module-federation/sdk": "0.0.0-next-
|
|
35
|
+
"@module-federation/sdk": "0.0.0-next-20241224050117"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@rsbuild/core": "^1.0.19"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@rsbuild/core": "1.x",
|
|
42
|
-
"@module-federation/enhanced": "0.0.0-next-
|
|
42
|
+
"@module-federation/enhanced": "0.0.0-next-20241224050117"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=16.0.0"
|