diff --git a/.gitignore b/.gitignore
index 4dca0955d..3ee2a5f10 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,4 +18,6 @@ test-results
!.vscode/settings.json
!.vscode/extensions.json
.idea/
-.nx/
\ No newline at end of file
+.nx/
+**/@mf-types
+**/@mf-types/**
\ No newline at end of file
diff --git a/examples/module-federation/mf-host/README.md b/examples/module-federation/mf-host/README.md
new file mode 100644
index 000000000..e2ac46d1e
--- /dev/null
+++ b/examples/module-federation/mf-host/README.md
@@ -0,0 +1,31 @@
+# Rsbuild Project
+
+Module Federation Host Example
+
+## Setup
+
+Install the dependencies:
+
+```bash
+pnpm install
+```
+
+## Get Started
+
+Start the dev server:
+
+```bash
+pnpm dev
+```
+
+Build the app for production:
+
+```bash
+pnpm build
+```
+
+Preview the production build locally:
+
+```bash
+pnpm preview
+```
diff --git a/examples/module-federation/mf-host/package.json b/examples/module-federation/mf-host/package.json
new file mode 100644
index 000000000..13fb503f0
--- /dev/null
+++ b/examples/module-federation/mf-host/package.json
@@ -0,0 +1,22 @@
+{
+ "name": "@example/mf-host",
+ "version": "1.0.0",
+ "private": true,
+ "scripts": {
+ "build": "rsbuild build",
+ "dev": "rsbuild dev",
+ "preview": "rsbuild preview"
+ },
+ "dependencies": {
+ "react": "^18.3.1",
+ "react-dom": "^18.3.1"
+ },
+ "devDependencies": {
+ "@module-federation/rsbuild-plugin": "^0.0.2",
+ "@rsbuild/core": "~1.0.14",
+ "@rsbuild/plugin-react": "^1.0.4",
+ "@types/react": "^18.3.11",
+ "@types/react-dom": "^18.3.1",
+ "typescript": "^5.6.3"
+ }
+}
diff --git a/examples/module-federation/mf-host/rsbuild.config.ts b/examples/module-federation/mf-host/rsbuild.config.ts
new file mode 100644
index 000000000..38578026b
--- /dev/null
+++ b/examples/module-federation/mf-host/rsbuild.config.ts
@@ -0,0 +1,24 @@
+import { pluginModuleFederation } from '@module-federation/rsbuild-plugin';
+import { defineConfig } from '@rsbuild/core';
+import { pluginReact } from '@rsbuild/plugin-react';
+
+export default defineConfig({
+ plugins: [
+ pluginReact(),
+ pluginModuleFederation({
+ name: 'rsbuild_host',
+ remotes: {
+ rslib: 'rslib@http://localhost:3001/mf/mf-manifest.json',
+ },
+ shared: {
+ react: {
+ singleton: true,
+ },
+ 'react-dom': {
+ singleton: true,
+ },
+ },
+ shareStrategy: 'loaded-first',
+ }),
+ ],
+});
diff --git a/examples/module-federation/mf-host/src/App.css b/examples/module-federation/mf-host/src/App.css
new file mode 100644
index 000000000..164c0a6aa
--- /dev/null
+++ b/examples/module-federation/mf-host/src/App.css
@@ -0,0 +1,26 @@
+body {
+ margin: 0;
+ color: #fff;
+ font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
+ background-image: linear-gradient(to bottom, #020917, #101725);
+}
+
+.content {
+ display: flex;
+ min-height: 100vh;
+ line-height: 1.1;
+ text-align: center;
+ flex-direction: column;
+ justify-content: center;
+}
+
+.content h1 {
+ font-size: 3.6rem;
+ font-weight: 700;
+}
+
+.content p {
+ font-size: 1.2rem;
+ font-weight: 400;
+ opacity: 0.5;
+}
diff --git a/examples/module-federation/mf-host/src/App.tsx b/examples/module-federation/mf-host/src/App.tsx
new file mode 100644
index 000000000..e0abf32ab
--- /dev/null
+++ b/examples/module-federation/mf-host/src/App.tsx
@@ -0,0 +1,14 @@
+import { Counter } from 'rslib';
+import './App.css';
+
+const App = () => {
+ return (
+
+
+
Rsbuild with React
+
Start building amazing things with Rsbuild.
+
+ );
+};
+
+export default App;
diff --git a/examples/module-federation/mf-host/src/bootstrap.tsx b/examples/module-federation/mf-host/src/bootstrap.tsx
new file mode 100644
index 000000000..55f29bff5
--- /dev/null
+++ b/examples/module-federation/mf-host/src/bootstrap.tsx
@@ -0,0 +1,13 @@
+import React from 'react';
+import ReactDOM from 'react-dom/client';
+import App from './App';
+
+const rootEl = document.getElementById('root');
+if (rootEl) {
+ const root = ReactDOM.createRoot(rootEl);
+ root.render(
+
+
+ ,
+ );
+}
diff --git a/examples/module-federation/mf-host/src/env.d.ts b/examples/module-federation/mf-host/src/env.d.ts
new file mode 100644
index 000000000..b0ac762b0
--- /dev/null
+++ b/examples/module-federation/mf-host/src/env.d.ts
@@ -0,0 +1 @@
+///
diff --git a/examples/module-federation/mf-host/src/index.ts b/examples/module-federation/mf-host/src/index.ts
new file mode 100644
index 000000000..b93c7a026
--- /dev/null
+++ b/examples/module-federation/mf-host/src/index.ts
@@ -0,0 +1 @@
+import('./bootstrap');
diff --git a/examples/module-federation/mf-host/tsconfig.json b/examples/module-federation/mf-host/tsconfig.json
new file mode 100644
index 000000000..22506ed81
--- /dev/null
+++ b/examples/module-federation/mf-host/tsconfig.json
@@ -0,0 +1,20 @@
+{
+ "compilerOptions": {
+ "target": "ES2020",
+ "lib": ["DOM", "ES2020"],
+ "module": "ESNext",
+ "jsx": "react-jsx",
+ "noEmit": true,
+ "strict": true,
+ "skipLibCheck": true,
+ "isolatedModules": true,
+ "resolveJsonModule": true,
+ "moduleResolution": "bundler",
+ "useDefineForClassFields": true,
+ "allowImportingTsExtensions": true,
+ "paths": {
+ "*": ["./@mf-types/*"]
+ }
+ },
+ "include": ["src"]
+}
diff --git a/examples/module-federation/mf-react-component/README.md b/examples/module-federation/mf-react-component/README.md
new file mode 100644
index 000000000..f4c237d68
--- /dev/null
+++ b/examples/module-federation/mf-react-component/README.md
@@ -0,0 +1,3 @@
+# @examples/mf-react-component
+
+This example demonstrates how to use Rslib to build a simple Module Federation React component.
diff --git a/examples/module-federation/mf-react-component/package.json b/examples/module-federation/mf-react-component/package.json
new file mode 100644
index 000000000..0b7055b4b
--- /dev/null
+++ b/examples/module-federation/mf-react-component/package.json
@@ -0,0 +1,31 @@
+{
+ "name": "@examples/mf-react-component",
+ "private": true,
+ "exports": {
+ ".": {
+ "import": "./dist/esm/index.mjs",
+ "require": "./dist/cjs/index.js",
+ "types": "./dist/cjs/index.d.ts"
+ }
+ },
+ "main": "./dist/cjs/index.js",
+ "module": "./dist/esm/index.mjs",
+ "types": "./dist/cjs/index.d.ts",
+ "scripts": {
+ "build": "rslib build",
+ "serve": "pnpm build && http-server -p 3001 ./dist/ --cors"
+ },
+ "devDependencies": {
+ "@module-federation/enhanced": "^0.6.11",
+ "@module-federation/rsbuild-plugin": "^0.0.2",
+ "@rsbuild/plugin-react": "^1.0.4",
+ "@rslib/core": "workspace:*",
+ "@types/react": "^18.3.11",
+ "http-server": "^14.1.1",
+ "react": "^18.3.1",
+ "react-dom": "^18.3.1"
+ },
+ "peerDependencies": {
+ "react": "*"
+ }
+}
diff --git a/examples/module-federation/mf-react-component/rslib.config.ts b/examples/module-federation/mf-react-component/rslib.config.ts
new file mode 100644
index 000000000..8eb13c332
--- /dev/null
+++ b/examples/module-federation/mf-react-component/rslib.config.ts
@@ -0,0 +1,59 @@
+import { pluginModuleFederation } from '@module-federation/rsbuild-plugin';
+import { pluginReact } from '@rsbuild/plugin-react';
+import { defineConfig } from '@rslib/core';
+
+const shared = {
+ dts: {
+ bundle: false,
+ },
+};
+
+export default defineConfig({
+ lib: [
+ {
+ ...shared,
+ format: 'esm',
+ output: {
+ distPath: {
+ root: './dist/esm',
+ },
+ },
+ },
+ {
+ ...shared,
+ format: 'cjs',
+ output: {
+ distPath: {
+ root: './dist/cjs',
+ },
+ },
+ },
+ {
+ ...shared,
+ format: 'mf',
+ output: {
+ distPath: {
+ root: './dist/mf',
+ },
+ assetPrefix: 'http://localhost:3001/mf',
+ },
+ plugins: [
+ pluginModuleFederation({
+ name: 'rslib_provider',
+ exposes: {
+ '.': './src/index.tsx',
+ },
+ shared: {
+ react: {
+ singleton: true,
+ },
+ 'react-dom': {
+ singleton: true,
+ },
+ },
+ }),
+ ],
+ },
+ ],
+ plugins: [pluginReact()],
+});
diff --git a/examples/module-federation/mf-react-component/src/CounterButton.tsx b/examples/module-federation/mf-react-component/src/CounterButton.tsx
new file mode 100644
index 000000000..a5eb133fb
--- /dev/null
+++ b/examples/module-federation/mf-react-component/src/CounterButton.tsx
@@ -0,0 +1,15 @@
+interface CounterButtonProps {
+ onClick: () => void;
+ label: string;
+ [key: string]: any;
+}
+
+export const CounterButton: React.FC = ({
+ onClick,
+ label,
+ ...props
+}) => (
+
+);
diff --git a/examples/module-federation/mf-react-component/src/index.tsx b/examples/module-federation/mf-react-component/src/index.tsx
new file mode 100644
index 000000000..0262fe4c8
--- /dev/null
+++ b/examples/module-federation/mf-react-component/src/index.tsx
@@ -0,0 +1,39 @@
+import { init, loadRemote } from '@module-federation/enhanced/runtime';
+import { Suspense, createElement, lazy } from 'react';
+import { CounterButton } from './CounterButton';
+import { useCounter } from './useCounter';
+
+init({
+ name: 'rslib_provider',
+ remotes: [
+ {
+ name: 'mf_remote',
+ entry: 'http://localhost:3002/mf-manifest.json',
+ },
+ ],
+});
+
+export const Counter: React.FC = () => {
+ const { count, increment, decrement } = useCounter();
+
+ return (
+
+ loading
}>
+ {createElement(
+ lazy(
+ () =>
+ loadRemote('mf_remote') as Promise<{
+ default: React.FC;
+ }>,
+ ),
+ )}
+
+
+ Counter From Rslib MF Format:
+ {count}
+
+
+
+
+ );
+};
diff --git a/examples/module-federation/mf-react-component/src/useCounter.tsx b/examples/module-federation/mf-react-component/src/useCounter.tsx
new file mode 100644
index 000000000..885dbdfe0
--- /dev/null
+++ b/examples/module-federation/mf-react-component/src/useCounter.tsx
@@ -0,0 +1,10 @@
+import { useState } from 'react';
+
+export const useCounter = (initialValue = 0) => {
+ const [count, setCount] = useState(initialValue);
+
+ const increment = () => setCount((prev) => prev + 1);
+ const decrement = () => setCount((prev) => prev - 1);
+
+ return { count, increment, decrement };
+};
diff --git a/examples/module-federation/mf-react-component/tsconfig.json b/examples/module-federation/mf-react-component/tsconfig.json
new file mode 100644
index 000000000..19bcd30dd
--- /dev/null
+++ b/examples/module-federation/mf-react-component/tsconfig.json
@@ -0,0 +1,8 @@
+{
+ "compilerOptions": {
+ "jsx": "react-jsx",
+ "strict": true,
+ "skipLibCheck": true
+ },
+ "include": ["src/**/*"]
+}
diff --git a/examples/module-federation/mf-remote/README.md b/examples/module-federation/mf-remote/README.md
new file mode 100644
index 000000000..8f58a99c3
--- /dev/null
+++ b/examples/module-federation/mf-remote/README.md
@@ -0,0 +1,31 @@
+# Rsbuild Project
+
+Module Federation Remote Example
+
+## Setup
+
+Install the dependencies:
+
+```bash
+pnpm install
+```
+
+## Get Started
+
+Start the dev server:
+
+```bash
+pnpm dev
+```
+
+Build the app for production:
+
+```bash
+pnpm build
+```
+
+Preview the production build locally:
+
+```bash
+pnpm preview
+```
diff --git a/examples/module-federation/mf-remote/package.json b/examples/module-federation/mf-remote/package.json
new file mode 100644
index 000000000..e075d8e50
--- /dev/null
+++ b/examples/module-federation/mf-remote/package.json
@@ -0,0 +1,22 @@
+{
+ "name": "@example/mf-remote",
+ "version": "1.0.0",
+ "private": true,
+ "scripts": {
+ "build": "rsbuild build",
+ "dev": "rsbuild dev",
+ "preview": "rsbuild preview"
+ },
+ "dependencies": {
+ "react": "^18.3.1",
+ "react-dom": "^18.3.1"
+ },
+ "devDependencies": {
+ "@module-federation/rsbuild-plugin": "^0.0.2",
+ "@rsbuild/core": "~1.0.14",
+ "@rsbuild/plugin-react": "^1.0.4",
+ "@types/react": "^18.3.11",
+ "@types/react-dom": "^18.3.1",
+ "typescript": "^5.6.3"
+ }
+}
diff --git a/examples/module-federation/mf-remote/rsbuild.config.ts b/examples/module-federation/mf-remote/rsbuild.config.ts
new file mode 100644
index 000000000..c9ab13fbb
--- /dev/null
+++ b/examples/module-federation/mf-remote/rsbuild.config.ts
@@ -0,0 +1,26 @@
+import { pluginModuleFederation } from '@module-federation/rsbuild-plugin';
+import { defineConfig } from '@rsbuild/core';
+import { pluginReact } from '@rsbuild/plugin-react';
+
+export default defineConfig({
+ plugins: [
+ pluginReact(),
+ pluginModuleFederation({
+ name: 'rsbuild_remote',
+ exposes: {
+ '.': './src/App.tsx',
+ },
+ shared: {
+ react: {
+ singleton: true,
+ },
+ 'react-dom': {
+ singleton: true,
+ },
+ },
+ }),
+ ],
+ server: {
+ port: 3002,
+ },
+});
diff --git a/examples/module-federation/mf-remote/src/App.tsx b/examples/module-federation/mf-remote/src/App.tsx
new file mode 100644
index 000000000..c514d1b84
--- /dev/null
+++ b/examples/module-federation/mf-remote/src/App.tsx
@@ -0,0 +1,5 @@
+const App = () => {
+ return MF Remote App loaded by Rslib MF Format
;
+};
+
+export default App;
diff --git a/examples/module-federation/mf-remote/src/bootstrap.tsx b/examples/module-federation/mf-remote/src/bootstrap.tsx
new file mode 100644
index 000000000..55f29bff5
--- /dev/null
+++ b/examples/module-federation/mf-remote/src/bootstrap.tsx
@@ -0,0 +1,13 @@
+import React from 'react';
+import ReactDOM from 'react-dom/client';
+import App from './App';
+
+const rootEl = document.getElementById('root');
+if (rootEl) {
+ const root = ReactDOM.createRoot(rootEl);
+ root.render(
+
+
+ ,
+ );
+}
diff --git a/examples/module-federation/mf-remote/src/env.d.ts b/examples/module-federation/mf-remote/src/env.d.ts
new file mode 100644
index 000000000..b0ac762b0
--- /dev/null
+++ b/examples/module-federation/mf-remote/src/env.d.ts
@@ -0,0 +1 @@
+///
diff --git a/examples/module-federation/mf-remote/src/index.tsx b/examples/module-federation/mf-remote/src/index.tsx
new file mode 100644
index 000000000..b93c7a026
--- /dev/null
+++ b/examples/module-federation/mf-remote/src/index.tsx
@@ -0,0 +1 @@
+import('./bootstrap');
diff --git a/examples/module-federation/mf-remote/tsconfig.json b/examples/module-federation/mf-remote/tsconfig.json
new file mode 100644
index 000000000..6fe002723
--- /dev/null
+++ b/examples/module-federation/mf-remote/tsconfig.json
@@ -0,0 +1,17 @@
+{
+ "compilerOptions": {
+ "target": "ES2020",
+ "lib": ["DOM", "ES2020"],
+ "module": "ESNext",
+ "jsx": "react-jsx",
+ "noEmit": true,
+ "strict": true,
+ "skipLibCheck": true,
+ "isolatedModules": true,
+ "resolveJsonModule": true,
+ "moduleResolution": "bundler",
+ "useDefineForClassFields": true,
+ "allowImportingTsExtensions": true
+ },
+ "include": ["src"]
+}
diff --git a/examples/module-federation/package.json b/examples/module-federation/package.json
new file mode 100644
index 000000000..a6489625d
--- /dev/null
+++ b/examples/module-federation/package.json
@@ -0,0 +1,9 @@
+{
+ "name": "@example/mf",
+ "scripts": {
+ "dev:all": "pnpm dev:host & pnpm dev:lib & pnpm dev:remote",
+ "dev:host": "pnpm --filter mf-host dev",
+ "dev:lib": "pnpm --filter mf-react-component run serve",
+ "dev:remote": "pnpm --filter mf-remote dev"
+ }
+}
diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts
index 4f69016c5..89b44a875 100644
--- a/packages/core/src/config.ts
+++ b/packages/core/src/config.ts
@@ -47,6 +47,7 @@ import type {
import { getDefaultExtension } from './utils/extension';
import {
calcLongestCommonPath,
+ checkMFPlugin,
color,
isEmptyObject,
isObject,
@@ -285,9 +286,9 @@ export const composeAutoExternalConfig = (options: {
: {};
};
-export function composeMinifyConfig(
- minify: NonNullable['minify'],
-): RsbuildConfig {
+export function composeMinifyConfig(config: LibConfig): RsbuildConfig {
+ const minify = config.output?.minify;
+ const format = config.format;
if (minify !== undefined) {
// User's minify configuration will be merged afterwards.
return {};
@@ -308,7 +309,8 @@ export function composeMinifyConfig(
defaults: false,
unused: true,
dead_code: true,
- toplevel: true,
+ // remoteEntry's global variable will be tree-shaken if `toplevel` is enabled in "mf" format
+ toplevel: format !== 'mf',
},
format: {
comments: 'all',
@@ -454,7 +456,13 @@ const composeFormatConfig = ({
format,
bundle = true,
umdName,
-}: { format: Format; bundle?: boolean; umdName?: string }): RsbuildConfig => {
+ pkgJson,
+}: {
+ format: Format;
+ pkgJson: PkgJson;
+ bundle?: boolean;
+ umdName?: string;
+}): RsbuildConfig => {
const jsParserOptions = {
cjs: {
requireResolve: false,
@@ -557,6 +565,23 @@ const composeFormatConfig = ({
return config;
}
+ case 'mf':
+ return {
+ tools: {
+ rspack: {
+ output: {
+ uniqueName: pkgJson.name as string,
+ },
+ // TODO when we provide dev mode for rslib mf format, this should be modified to as the same with config.mode
+ // can not set nodeEnv to false, because mf format should build shared module.
+ // If nodeEnv is false, the process.env.NODE_ENV in third-party packages's will not be replaced
+ // now we have not provide dev mode for users, so we can always set nodeEnv as 'production'
+ optimization: {
+ nodeEnv: 'production',
+ },
+ },
+ },
+ };
default:
throw new Error(`Unsupported format: ${format}`);
}
@@ -598,6 +623,8 @@ const composeShimsConfig = (format: Format, shims?: Shims): RsbuildConfig => {
};
case 'umd':
return {};
+ case 'mf':
+ return {};
default:
throw new Error(`Unsupported format: ${format}`);
}
@@ -619,12 +646,14 @@ const composeExternalsConfig = (
esm: 'module-import',
cjs: 'commonjs',
umd: 'umd',
+ mf: 'var', // same as default value
} as const;
switch (format) {
case 'esm':
case 'cjs':
case 'umd':
+ case 'mf':
return {
output: externals
? {
@@ -967,6 +996,7 @@ const composeExternalHelpersConfig = (
};
async function composeLibRsbuildConfig(config: LibConfig, configPath: string) {
+ checkMFPlugin(config);
const rootPath = dirname(configPath);
const pkgJson = readPackageJson(rootPath);
const { compilerOptions } = await loadTsconfig(
@@ -990,6 +1020,7 @@ async function composeLibRsbuildConfig(config: LibConfig, configPath: string) {
const shimsConfig = composeShimsConfig(format!, shims);
const formatConfig = composeFormatConfig({
format: format!,
+ pkgJson: pkgJson!,
bundle,
umdName,
});
@@ -1035,7 +1066,7 @@ async function composeLibRsbuildConfig(config: LibConfig, configPath: string) {
autoExternalConfig?.output?.externals,
externalsConfig?.output?.externals,
);
- const minifyConfig = composeMinifyConfig(config.output?.minify);
+ const minifyConfig = composeMinifyConfig(config);
const bannerFooterConfig = composeBannerFooterConfig(banner, footer);
const decoratorsConfig = composeDecoratorsConfig(
compilerOptions,
@@ -1152,6 +1183,7 @@ export async function initRsbuild(
esm: 0,
cjs: 0,
umd: 0,
+ mf: 0,
};
for (const { format, config } of rsbuildConfigObject) {
diff --git a/packages/core/src/types/config/index.ts b/packages/core/src/types/config/index.ts
index dcfe7eea4..35e9e5502 100644
--- a/packages/core/src/types/config/index.ts
+++ b/packages/core/src/types/config/index.ts
@@ -1,7 +1,7 @@
import type { RsbuildConfig } from '@rsbuild/core';
import type { PluginDtsOptions } from 'rsbuild-plugin-dts';
-export type Format = 'esm' | 'cjs' | 'umd';
+export type Format = 'esm' | 'cjs' | 'umd' | 'mf';
export type FixedEcmaVersions =
| 'es5'
diff --git a/packages/core/src/types/utils.ts b/packages/core/src/types/utils.ts
index bc99ee756..146dd76a3 100644
--- a/packages/core/src/types/utils.ts
+++ b/packages/core/src/types/utils.ts
@@ -1,4 +1,5 @@
export type PkgJson = {
+ name: string;
type?: 'module' | 'commonjs';
dependencies?: Record;
peerDependencies?: Record;
diff --git a/packages/core/src/utils/helper.ts b/packages/core/src/utils/helper.ts
index 00bdc66ea..e1d35c4b5 100644
--- a/packages/core/src/utils/helper.ts
+++ b/packages/core/src/utils/helper.ts
@@ -2,7 +2,8 @@ import fs from 'node:fs';
import fsP from 'node:fs/promises';
import path from 'node:path';
import color from 'picocolors';
-import type { PkgJson } from '../types';
+
+import type { LibConfig, PkgJson } from '../types';
import { logger } from './logger';
/**
@@ -161,4 +162,36 @@ export function omit(
);
}
+export function isPluginIncluded(
+ config: LibConfig,
+ pluginName: string,
+): boolean {
+ return Boolean(
+ config.plugins?.some((plugin) => {
+ if (typeof plugin === 'object' && plugin !== null && 'name' in plugin) {
+ return plugin.name === pluginName;
+ }
+ return false;
+ }),
+ );
+}
+
+export function checkMFPlugin(config: LibConfig): boolean {
+ if (config.format !== 'mf') {
+ return true;
+ }
+
+ // https://github.com/module-federation/core/blob/4e5c4b96ee45899f3ba5904b8927768980d5ad0e/packages/rsbuild-plugin/src/cli/index.ts#L17
+ const added = isPluginIncluded(config, 'rsbuild:module-federation-enhanced');
+ if (!added) {
+ logger.warn(
+ `${color.green('format: "mf"')} should be used with ${color.blue(
+ '@module-federation/rsbuild-plugin',
+ )}", consider installing and adding it to plugins. Check the documentation (https://module-federation.io/guide/basic/rsbuild.html#rslib-module) to get started with "mf" output.`,
+ );
+ process.exit(1);
+ }
+ return added;
+}
+
export { color };
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index cd68a5ef4..accb09d52 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -75,6 +75,91 @@ importers:
specifier: ^5.6.3
version: 5.6.3
+ examples/module-federation: {}
+
+ examples/module-federation/mf-host:
+ dependencies:
+ react:
+ specifier: ^18.3.1
+ version: 18.3.1
+ react-dom:
+ specifier: ^18.3.1
+ version: 18.3.1(react@18.3.1)
+ devDependencies:
+ '@module-federation/rsbuild-plugin':
+ specifier: ^0.0.2
+ version: 0.0.2(@module-federation/enhanced@0.6.11(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.0.14)
+ '@rsbuild/core':
+ specifier: ~1.0.14
+ version: 1.0.14
+ '@rsbuild/plugin-react':
+ specifier: ^1.0.4
+ version: 1.0.4(@rsbuild/core@1.0.14)
+ '@types/react':
+ specifier: ^18.3.11
+ version: 18.3.11
+ '@types/react-dom':
+ specifier: ^18.3.1
+ version: 18.3.1
+ typescript:
+ specifier: ^5.6.3
+ version: 5.6.3
+
+ examples/module-federation/mf-react-component:
+ devDependencies:
+ '@module-federation/enhanced':
+ specifier: ^0.6.11
+ version: 0.6.11(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0)
+ '@module-federation/rsbuild-plugin':
+ specifier: ^0.0.2
+ version: 0.0.2(@module-federation/enhanced@0.6.11(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.0.14)
+ '@rsbuild/plugin-react':
+ specifier: ^1.0.4
+ version: 1.0.4(@rsbuild/core@1.0.14)
+ '@rslib/core':
+ specifier: workspace:*
+ version: link:../../../packages/core
+ '@types/react':
+ specifier: ^18.3.11
+ version: 18.3.11
+ http-server:
+ specifier: ^14.1.1
+ version: 14.1.1
+ react:
+ specifier: ^18.3.1
+ version: 18.3.1
+ react-dom:
+ specifier: ^18.3.1
+ version: 18.3.1(react@18.3.1)
+
+ examples/module-federation/mf-remote:
+ dependencies:
+ react:
+ specifier: ^18.3.1
+ version: 18.3.1
+ react-dom:
+ specifier: ^18.3.1
+ version: 18.3.1(react@18.3.1)
+ devDependencies:
+ '@module-federation/rsbuild-plugin':
+ specifier: ^0.0.2
+ version: 0.0.2(@module-federation/enhanced@0.6.11(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.0.14)
+ '@rsbuild/core':
+ specifier: ~1.0.14
+ version: 1.0.14
+ '@rsbuild/plugin-react':
+ specifier: ^1.0.4
+ version: 1.0.4(@rsbuild/core@1.0.14)
+ '@types/react':
+ specifier: ^18.3.11
+ version: 18.3.11
+ '@types/react-dom':
+ specifier: ^18.3.1
+ version: 18.3.1
+ typescript:
+ specifier: ^5.6.3
+ version: 5.6.3
+
examples/react-component-bundle:
devDependencies:
'@rsbuild/plugin-react':
@@ -1085,18 +1170,89 @@ packages:
'@modern-js/utils@2.60.2':
resolution: {integrity: sha512-7T95WiwSlfoX/3vQiTSRE1QGt5GIm0/DeXFbN4pyQzqzFLWrgnVmlloKHKQSejDlgp7ttRZZpBiRVmIiqZX98Q==}
+ '@module-federation/bridge-react-webpack-plugin@0.6.11':
+ resolution: {integrity: sha512-VUD7g1RIom7KtQaO7bcPd7sCzsO6jeRVwOSx5smFr9K6FpkWeiwWtJmhyuhc0uzstzVdkOk77pqMP0xmrXpV+g==}
+
+ '@module-federation/data-prefetch@0.6.11':
+ resolution: {integrity: sha512-cNCk1YJJal2RvMKu2S413GVHlEUMYbzzzJbWBzZXwcW3DupOeLGs2ENvl32whAvF1RyOlf6LRYcypqE22LUxBQ==}
+ peerDependencies:
+ react: '>=16.9.0'
+ react-dom: '>=16.9.0'
+
+ '@module-federation/dts-plugin@0.6.11':
+ resolution: {integrity: sha512-BRKfLuDuFou/Mg3MlatZN67HSIJ/M4t7mpxeYl93bu7q+87zzD+wUSrY+I+pGz+VEmN/LJ5TujMW4jS3XOP2Pw==}
+ peerDependencies:
+ typescript: ^4.9.0 || ^5.0.0
+ vue-tsc: '>=1.0.24'
+ peerDependenciesMeta:
+ vue-tsc:
+ optional: true
+
+ '@module-federation/enhanced@0.6.11':
+ resolution: {integrity: sha512-billwprfdc/ehPFdwCNTdm0685pry0qvlhrT9UEYjqHDMHanXTWNQJJLqf5Tz8OzA2/ex6+y8yMcdeKJs+nXEQ==}
+ peerDependencies:
+ typescript: ^4.9.0 || ^5.0.0
+ vue-tsc: '>=1.0.24'
+ webpack: ^5.0.0
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+ vue-tsc:
+ optional: true
+ webpack:
+ optional: true
+
+ '@module-federation/managers@0.6.11':
+ resolution: {integrity: sha512-HVw9eFTHCegRlWSmNbHXAnY19XHSj19RHHpjZ1Oo71DaHgjJAPJlg4izifcdWt0w+ObAQLOH1DacjYKMIT4W6Q==}
+
+ '@module-federation/manifest@0.6.11':
+ resolution: {integrity: sha512-HLtGulXJQUdOAAXhkDhNOnTld1EsnjNr2GEscsKNmP42vEEqEm6A6jL8hdKS/hrDZJmPOps7XcEv426+jMTDpA==}
+
+ '@module-federation/rsbuild-plugin@0.0.2':
+ resolution: {integrity: sha512-lUvZEbVeuXZ7ra2/RamNKv8iIEPReyBvDdLxR8X5KjElOmaTqII/27Iaz5RE/bbj1ByjOrym8rylba3eyRL95w==}
+ engines: {node: '>=16.0.0'}
+ peerDependencies:
+ '@module-federation/enhanced': 0.6.11
+ '@rsbuild/core': 1.x
+
+ '@module-federation/rspack@0.6.11':
+ resolution: {integrity: sha512-l2AH5J1oDvChc61dOJTPBBiJGD+wwcqRVbbjTYTCtZdxFgY6uBhTj0zOLWaSLlXO5DNkr5PyuPH1HCfGWlDwPA==}
+ peerDependencies:
+ typescript: ^4.9.0 || ^5.0.0
+ vue-tsc: '>=1.0.24'
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+ vue-tsc:
+ optional: true
+
'@module-federation/runtime-tools@0.5.1':
resolution: {integrity: sha512-nfBedkoZ3/SWyO0hnmaxuz0R0iGPSikHZOAZ0N/dVSQaIzlffUo35B5nlC2wgWIc0JdMZfkwkjZRrnuuDIJbzg==}
+ '@module-federation/runtime-tools@0.6.11':
+ resolution: {integrity: sha512-MGdCLaFfFyW6hTEaPKs8yEvOd9zvpaLADUL7WEaqWQ6XVt9GVATGDwA0muZT4+OFjtGsOgj5h5NGjZgIJxruSA==}
+
'@module-federation/runtime@0.5.1':
resolution: {integrity: sha512-xgiMUWwGLWDrvZc9JibuEbXIbhXg6z2oUkemogSvQ4LKvrl/n0kbqP1Blk669mXzyWbqtSp6PpvNdwaE1aN5xQ==}
+ '@module-federation/runtime@0.6.11':
+ resolution: {integrity: sha512-UTuavwCybLftAe4VT7cCqj+BVNlZwda/xmqIPAeYX14o7gkYFyA6zkxOQqfNCaDnTMR/KBk6EvE49yA6/ht9UQ==}
+
'@module-federation/sdk@0.5.1':
resolution: {integrity: sha512-exvchtjNURJJkpqjQ3/opdbfeT2wPKvrbnGnyRkrwW5o3FH1LaST1tkiNviT6OXTexGaVc2DahbdniQHVtQ7pA==}
+ '@module-federation/sdk@0.6.11':
+ resolution: {integrity: sha512-Fj2ws9yL6mGAki9GdurcrIhdSg0L2Kfw7L6Dej/DidzAU4bwa3MT0s+87BPuOYFgm2UTMN3g+UrElC2NhsuulQ==}
+
+ '@module-federation/third-party-dts-extractor@0.6.11':
+ resolution: {integrity: sha512-KEHF71/qmEhME1XK/0XpMHKaSRjwmINpul9iu5Z4UBNtoMIydq6SH41DsWF3HxAManhqe+ZwCxyoSn2Yxm5d0Q==}
+
'@module-federation/webpack-bundler-runtime@0.5.1':
resolution: {integrity: sha512-mMhRFH0k2VjwHt3Jol9JkUsmI/4XlrAoBG3E0o7HoyoPYv1UFOWyqAflfANcUPgbYpvqmyLzDcO+3IT36LXnrA==}
+ '@module-federation/webpack-bundler-runtime@0.6.11':
+ resolution: {integrity: sha512-s9VtE+cthnCsutl0o48qBRaLP3oQGA1FESLG9dwIHpUN9G7zRtewf0HjlCFFZG3ORRyTKBiJUi5qDWt9ky7XwQ==}
+
'@napi-rs/wasm-runtime@0.2.4':
resolution: {integrity: sha512-9zESzOO5aDByvhIAsOy9TbpZ0Ur2AJbUI7UT73kcUTS2mxAMHOBaa1st/jAymNoCtvrit99kkzT1FZuXVcgfIQ==}
@@ -1740,6 +1896,9 @@ packages:
'@types/react@18.3.11':
resolution: {integrity: sha512-r6QZ069rFTjrEYgFdOck1gK7FLVsgJE7tTz0pQBczlBNUhBNk0MQH4UbnFSwjpQLMkLzgqvBBa+qGpLje16eTQ==}
+ '@types/semver@7.5.8':
+ resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==}
+
'@types/send@0.17.4':
resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==}
@@ -1867,6 +2026,10 @@ packages:
engines: {node: '>=0.4.0'}
hasBin: true
+ adm-zip@0.5.16:
+ resolution: {integrity: sha512-TGw5yVi4saajsSEgz25grObGHEUaDrniwvA2qwSC060KfqGPdglhvPMA2lPIoxs3PQIItj2iag35fONcQqgUaQ==}
+ engines: {node: '>=12.0'}
+
ajv-draft-04@1.0.0:
resolution: {integrity: sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==}
peerDependencies:
@@ -1963,11 +2126,18 @@ packages:
resolution: {integrity: sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg==}
hasBin: true
+ async@2.6.4:
+ resolution: {integrity: sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==}
+
asynckit@0.4.0:
resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
- axios@1.7.5:
- resolution: {integrity: sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw==}
+ at-least-node@1.0.0:
+ resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==}
+ engines: {node: '>= 4.0.0'}
+
+ axios@1.7.7:
+ resolution: {integrity: sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==}
b-tween@0.3.3:
resolution: {integrity: sha512-oEHegcRpA7fAuc9KC4nktucuZn2aS8htymCPcP3qkEGPqiBH+GfqtqoG2l7LxHngg6O0HFM7hOeOYExl1Oz4ZA==}
@@ -1984,6 +2154,10 @@ packages:
base64-js@1.5.1:
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
+ basic-auth@2.0.1:
+ resolution: {integrity: sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==}
+ engines: {node: '>= 0.8'}
+
better-path-resolve@1.0.0:
resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==}
engines: {node: '>=4'}
@@ -2023,6 +2197,11 @@ packages:
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true
+ btoa@1.2.1:
+ resolution: {integrity: sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==}
+ engines: {node: '>= 0.4.0'}
+ hasBin: true
+
buffer-builder@0.2.0:
resolution: {integrity: sha512-7VPMEPuYznPSoR21NE1zvd2Xna6c/CloiZCfcMXR1Jny6PjX0N4Nsa38zcBFo/FMK+BlA+FLKbJCQ0i2yxp+Xg==}
@@ -2040,6 +2219,10 @@ packages:
resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==}
engines: {node: '>=8'}
+ cache-content-type@1.0.1:
+ resolution: {integrity: sha512-IKufZ1o4Ut42YUrZSo8+qnMTrFuKkvyoLXUywKz9GJ5BrhOFGhLdkx9sG4KAnVvbY6kEcSFjLQul+DVmBm2bgA==}
+ engines: {node: '>= 6.0.0'}
+
call-bind@1.0.7:
resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==}
engines: {node: '>= 0.4'}
@@ -2070,6 +2253,10 @@ packages:
resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==}
engines: {node: '>=4'}
+ chalk@3.0.0:
+ resolution: {integrity: sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==}
+ engines: {node: '>=8'}
+
chalk@4.1.2:
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
engines: {node: '>=10'}
@@ -2147,6 +2334,10 @@ packages:
resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==}
engines: {node: '>=0.8'}
+ co@4.6.0:
+ resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==}
+ engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'}
+
color-convert@1.9.3:
resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==}
@@ -2229,12 +2420,20 @@ packages:
resolution: {integrity: sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==}
engines: {node: '>= 0.6'}
+ cookies@0.9.1:
+ resolution: {integrity: sha512-TG2hpqe4ELx54QER/S3HQ9SRVnQnGBtKUz5bLQWtYAQ+o6GpgMs6sYUvaiJjVxb+UXwhRhAEP3m7LbsIZ77Hmw==}
+ engines: {node: '>= 0.8'}
+
copy-to-clipboard@3.3.3:
resolution: {integrity: sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==}
core-js@3.38.1:
resolution: {integrity: sha512-OP35aUorbU3Zvlx7pjsFdu1rGNnD4pgw/CWoYzRY3t2EzoVT7shKHY1dlAy3f41cGIO7ZDPQimhGFTlEYkG/Hw==}
+ corser@2.0.1:
+ resolution: {integrity: sha512-utCYNzRSQIZNPIcGZdQc92UVJYAhtGAteCFg0yRaFm8f0P+CPtyGyHXJcGXnffjCybUCEx3FQ2G7U3/o9eIkVQ==}
+ engines: {node: '>= 0.4.0'}
+
cosmiconfig@8.3.6:
resolution: {integrity: sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==}
engines: {node: '>=14'}
@@ -2247,6 +2446,10 @@ packages:
create-rstack@1.0.6:
resolution: {integrity: sha512-eBwYb3jQq6AIYY8dQWZ8UB1MfqxZndEzBZy6DEtwCYpAbMfcX3pujEuNUyj+fobp1MS8eTsRfPq9GOF1GykG7A==}
+ cron-parser@4.9.0:
+ resolution: {integrity: sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==}
+ engines: {node: '>=12.0.0'}
+
cross-env@7.0.3:
resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==}
engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'}
@@ -2293,6 +2496,10 @@ packages:
resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==}
engines: {node: '>= 12'}
+ date-format@4.0.14:
+ resolution: {integrity: sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==}
+ engines: {node: '>=4.0'}
+
dayjs@1.11.13:
resolution: {integrity: sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==}
@@ -2304,6 +2511,14 @@ packages:
supports-color:
optional: true
+ debug@3.2.7:
+ resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==}
+ peerDependencies:
+ supports-color: '*'
+ peerDependenciesMeta:
+ supports-color:
+ optional: true
+
debug@4.3.7:
resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==}
engines: {node: '>=6.0'}
@@ -2320,6 +2535,9 @@ packages:
resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==}
engines: {node: '>=6'}
+ deep-equal@1.0.1:
+ resolution: {integrity: sha512-bHtC0iYvWhyaTzvV3CZgPeZQqCOBGyGsVV7v4eevpdkLHfiSrXUdBG+qAuSz4RI70sszvjQ1QSZ98An1yNwpSw==}
+
deepmerge@4.3.1:
resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==}
engines: {node: '>=0.10.0'}
@@ -2339,6 +2557,13 @@ packages:
resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
engines: {node: '>=0.4.0'}
+ delegates@1.0.0:
+ resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==}
+
+ depd@1.1.2:
+ resolution: {integrity: sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==}
+ engines: {node: '>= 0.6'}
+
depd@2.0.0:
resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==}
engines: {node: '>= 0.8'}
@@ -2559,6 +2784,9 @@ packages:
resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==}
engines: {node: '>= 0.6'}
+ eventemitter3@4.0.7:
+ resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==}
+
events@3.3.0:
resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==}
engines: {node: '>=0.8.x'}
@@ -2567,6 +2795,10 @@ packages:
resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==}
engines: {node: '>=10'}
+ expand-tilde@2.0.2:
+ resolution: {integrity: sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==}
+ engines: {node: '>=0.10.0'}
+
express@4.21.1:
resolution: {integrity: sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==}
engines: {node: '>= 0.10.0'}
@@ -2617,6 +2849,14 @@ packages:
resolution: {integrity: sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==}
engines: {node: '>= 0.8'}
+ find-file-up@2.0.1:
+ resolution: {integrity: sha512-qVdaUhYO39zmh28/JLQM5CoYN9byEOKEH4qfa8K1eNV17W0UUMJ9WgbR/hHFH+t5rcl+6RTb5UC7ck/I+uRkpQ==}
+ engines: {node: '>=8'}
+
+ find-pkg@2.0.0:
+ resolution: {integrity: sha512-WgZ+nKbELDa6N3i/9nrHeNznm+lY3z4YfhDDWgW+5P0pdmMj26bxaxU11ookgY3NyP9GC7HvZ9etp0jRFqGEeQ==}
+ engines: {node: '>=8'}
+
find-up@4.1.0:
resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==}
engines: {node: '>=8'}
@@ -2632,6 +2872,9 @@ packages:
resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==}
hasBin: true
+ flatted@3.3.1:
+ resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==}
+
flexsearch@0.7.43:
resolution: {integrity: sha512-c5o/+Um8aqCSOXGcZoqZOm+NqtVwNsvVpWv6lfmSclU954O3wvQKxxK8zj74fPaSJbXpSLTs4PRhh+wnoCXnKg==}
@@ -2704,6 +2947,10 @@ packages:
resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==}
engines: {node: '>=6 <7 || >=8'}
+ fs-extra@9.1.0:
+ resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==}
+ engines: {node: '>=10'}
+
fsevents@2.3.2:
resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==}
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
@@ -2765,6 +3012,14 @@ packages:
resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==}
hasBin: true
+ global-modules@1.0.0:
+ resolution: {integrity: sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==}
+ engines: {node: '>=0.10.0'}
+
+ global-prefix@1.0.2:
+ resolution: {integrity: sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==}
+ engines: {node: '>=0.10.0'}
+
globals@11.12.0:
resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==}
engines: {node: '>=4'}
@@ -2806,6 +3061,10 @@ packages:
resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==}
engines: {node: '>= 0.4'}
+ has-tostringtag@1.0.2:
+ resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==}
+ engines: {node: '>= 0.4'}
+
hasown@2.0.2:
resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
engines: {node: '>= 0.4'}
@@ -2861,12 +3120,24 @@ packages:
hastscript@8.0.0:
resolution: {integrity: sha512-dMOtzCEd3ABUeSIISmrETiKuyydk1w0pa+gE/uormcTpSYuaNJPbX1NU3JLyscSLjwAQM8bWMhhIlnCqnRvDTw==}
+ he@1.2.0:
+ resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==}
+ hasBin: true
+
highlight.js@10.7.3:
resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==}
hoist-non-react-statics@3.3.2:
resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==}
+ homedir-polyfill@1.0.3:
+ resolution: {integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==}
+ engines: {node: '>=0.10.0'}
+
+ html-encoding-sniffer@3.0.0:
+ resolution: {integrity: sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==}
+ engines: {node: '>=12'}
+
html-entities@2.5.2:
resolution: {integrity: sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA==}
@@ -2892,10 +3163,27 @@ packages:
peerDependencies:
react: '>=15.6.1'
+ http-assert@1.5.0:
+ resolution: {integrity: sha512-uPpH7OKX4H25hBmU6G1jWNaqJGpTXxey+YOUizJUAgu0AjLUeC8D73hTrhvDS5D+GJN1DN1+hhc/eF/wpxtp0w==}
+ engines: {node: '>= 0.8'}
+
+ http-errors@1.8.1:
+ resolution: {integrity: sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==}
+ engines: {node: '>= 0.6'}
+
http-errors@2.0.0:
resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==}
engines: {node: '>= 0.8'}
+ http-proxy@1.18.1:
+ resolution: {integrity: sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==}
+ engines: {node: '>=8.0.0'}
+
+ http-server@14.1.1:
+ resolution: {integrity: sha512-+cbxadF40UXd9T01zUHgA+rlo2Bg1Srer4+B4NwIHdaGxAGGv59nYRnGGDJ9LBk7alpS0US+J+bLLdQOOkJq4A==}
+ engines: {node: '>=12'}
+ hasBin: true
+
human-id@1.0.2:
resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==}
@@ -2911,6 +3199,10 @@ packages:
resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==}
engines: {node: '>=0.10.0'}
+ iconv-lite@0.6.3:
+ resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==}
+ engines: {node: '>=0.10.0'}
+
ieee754@1.2.1:
resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
@@ -2932,6 +3224,9 @@ packages:
inherits@2.0.4:
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
+ ini@1.3.8:
+ resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==}
+
inline-style-parser@0.1.1:
resolution: {integrity: sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==}
@@ -2999,6 +3294,10 @@ packages:
resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}
engines: {node: '>=8'}
+ is-generator-function@1.0.10:
+ resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==}
+ engines: {node: '>= 0.4'}
+
is-glob@4.0.3:
resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==}
engines: {node: '>=0.10.0'}
@@ -3075,6 +3374,11 @@ packages:
resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==}
engines: {node: '>=0.10.0'}
+ isomorphic-ws@5.0.0:
+ resolution: {integrity: sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==}
+ peerDependencies:
+ ws: '*'
+
iterate-object@1.3.4:
resolution: {integrity: sha512-4dG1D1x/7g8PwHS9aK6QV5V94+ZvyP4+d19qDv43EzImmrndysIl4prmJ1hWWIGCqrZHyaHBm6BSEWHOLnpoNw==}
@@ -3139,6 +3443,10 @@ packages:
jsonfile@6.1.0:
resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==}
+ keygrip@1.1.0:
+ resolution: {integrity: sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==}
+ engines: {node: '>= 0.6'}
+
kind-of@6.0.3:
resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==}
engines: {node: '>=0.10.0'}
@@ -3147,6 +3455,17 @@ packages:
resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==}
engines: {node: '>=6'}
+ koa-compose@4.1.0:
+ resolution: {integrity: sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw==}
+
+ koa-convert@2.0.0:
+ resolution: {integrity: sha512-asOvN6bFlSnxewce2e/DK3p4tltyfC4VM7ZwuTuepI7dEQVcvpyFuBcEARu1+Hxg8DIwytce2n7jrZtRlPrARA==}
+ engines: {node: '>= 10'}
+
+ koa@2.15.3:
+ resolution: {integrity: sha512-j/8tY9j5t+GVMLeioLaxweJiKUayFhlGqNTzf2ZGwL0ZCQijd2RLHK0SLW5Tsko8YyyqCZC2cojIb0/s62qTAg==}
+ engines: {node: ^4.8.4 || ^6.10.1 || ^7.10.1 || >= 8.1.4}
+
leac@0.6.0:
resolution: {integrity: sha512-y+SqErxb8h7nE/fiEX07jsbuhrpO9lL8eca7/Y1nuWV2moNlXhyd59iDGcRf6moVyDMbmTNzL40SUyrFU/yDpg==}
@@ -3184,6 +3503,9 @@ packages:
lodash-es@4.17.21:
resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==}
+ lodash.clonedeepwith@4.5.0:
+ resolution: {integrity: sha512-QRBRSxhbtsX1nc0baxSkkK5WlVTTm/s48DSukcGcWZwIyI8Zz+lB+kFiELJXtzfH4Aj6kMWQ1VWW4U5uUDgZMA==}
+
lodash.startcase@4.4.0:
resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==}
@@ -3201,6 +3523,13 @@ packages:
resolution: {integrity: sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==}
engines: {node: '>=18'}
+ log4js@6.9.1:
+ resolution: {integrity: sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g==}
+ engines: {node: '>=8.0'}
+
+ long-timeout@0.1.1:
+ resolution: {integrity: sha512-BFRuQUqc7x2NWxfJBCyUrN8iYUYznzL9JROmRz1gZ6KlOIgmoD+njPVbb+VNn2nGMKggMsK79iUNErillsrx7w==}
+
longest-streak@3.1.0:
resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==}
@@ -3230,6 +3559,10 @@ packages:
resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==}
engines: {node: '>=10'}
+ luxon@3.5.0:
+ resolution: {integrity: sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ==}
+ engines: {node: '>=12'}
+
magic-string@0.30.12:
resolution: {integrity: sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==}
@@ -3470,6 +3803,10 @@ packages:
resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==}
engines: {node: '>=16 || 14 >=14.17'}
+ mkdirp@0.5.6:
+ resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==}
+ hasBin: true
+
mri@1.2.0:
resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==}
engines: {node: '>=4'}
@@ -3521,6 +3858,10 @@ packages:
node-releases@2.0.18:
resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==}
+ node-schedule@2.1.1:
+ resolution: {integrity: sha512-OXdegQq03OmXEjt2hZP33W2YPs/E5BcFQks46+G2gAxs4gHOIVD1u7EqlYLYSKsaIpyKCK9Gbk0ta1/gjRSMRQ==}
+ engines: {node: '>=6'}
+
normalize-path@3.0.0:
resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==}
engines: {node: '>=0.10.0'}
@@ -3577,10 +3918,17 @@ packages:
resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==}
engines: {node: '>=18'}
+ only@0.0.2:
+ resolution: {integrity: sha512-Fvw+Jemq5fjjyWz6CpKx6w9s7xxqo3+JCyM0WXWeCSOboZ8ABkyvP8ID4CZuChA/wxSx+XSJmdOm8rGVyJ1hdQ==}
+
open@8.4.2:
resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==}
engines: {node: '>=12'}
+ opener@1.5.2:
+ resolution: {integrity: sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==}
+ hasBin: true
+
ora@5.3.0:
resolution: {integrity: sha512-zAKMgGXUim0Jyd6CXK9lraBnD3H5yPGBPPOkC23a2BG6hsm4Zu6OQSjQuEtV0BHDf4aKHcUFvJiGRrFuW3MG8g==}
engines: {node: '>=10'}
@@ -3644,6 +3992,10 @@ packages:
resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==}
engines: {node: '>=8'}
+ parse-passwd@1.0.0:
+ resolution: {integrity: sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==}
+ engines: {node: '>=0.10.0'}
+
parse5@6.0.1:
resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==}
@@ -3728,6 +4080,10 @@ packages:
engines: {node: '>=18'}
hasBin: true
+ portfinder@1.0.32:
+ resolution: {integrity: sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==}
+ engines: {node: '>= 0.12.0'}
+
postcss-alias@2.0.0:
resolution: {integrity: sha512-SzsjZdGaqVRql33315QLrhnNpNvvH2skp0hXpjzz+nYmaSwXSUjk4JADJRi7zUkwYyCXj41fy1go5MR3S9TDyg==}
@@ -3843,6 +4199,9 @@ packages:
r-json@1.3.0:
resolution: {integrity: sha512-xesd+RHCpymPCYd9DvDvUr1w1IieSChkqYF1EpuAYrvCfLXji9NP36DvyYZJZZB5soVDvZ0WUtBoZaU1g5Yt9A==}
+ rambda@9.3.0:
+ resolution: {integrity: sha512-cl/7DCCKNxmsbc0dXZTJTY08rvDdzLhVfE6kPBson1fWzDapLzv0RKSzjpmAqP53fkQqAvq05gpUVHTrUNsuxg==}
+
randombytes@2.1.0:
resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==}
@@ -3986,9 +4345,16 @@ packages:
resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==}
engines: {node: '>=0.10.0'}
+ requires-port@1.0.0:
+ resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==}
+
resize-observer-polyfill@1.5.1:
resolution: {integrity: sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==}
+ resolve-dir@1.0.1:
+ resolution: {integrity: sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==}
+ engines: {node: '>=0.10.0'}
+
resolve-from@4.0.0:
resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==}
engines: {node: '>=4'}
@@ -4013,6 +4379,9 @@ packages:
resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==}
engines: {iojs: '>=1.0.0', node: '>=0.10.0'}
+ rfdc@1.4.1:
+ resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==}
+
rollup-plugin-dts@6.1.1:
resolution: {integrity: sha512-aSHRcJ6KG2IHIioYlvAOcEq6U99sVtqDDKVhnwt70rW6tsz3tv5OSjEiWcgzfsHdLyGXZ/3b/7b/+Za3Y6r1XA==}
engines: {node: '>=16'}
@@ -4070,6 +4439,9 @@ packages:
resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==}
engines: {node: '>=6'}
+ safe-buffer@5.1.2:
+ resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==}
+
safe-buffer@5.2.1:
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
@@ -4215,6 +4587,9 @@ packages:
resolution: {integrity: sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==}
engines: {node: '>=4'}
+ secure-compare@3.0.1:
+ resolution: {integrity: sha512-AckIIV90rPDcBcglUwXPF3kg0P0qmPsPXAj6BBEENQE1p5yA1xfmDJzfi1Tappj37Pv2mVbKpL3Z1T+Nn7k1Qw==}
+
selderee@0.11.0:
resolution: {integrity: sha512-5TF+l7p4+OsnP8BCCvSyZiSPc4x4//p5uPwK8TCnVPJYRmU2aYKMpOXvw8zM5a5JvuuCGN1jmsMwuU2W02ukfA==}
@@ -4227,8 +4602,8 @@ packages:
engines: {node: '>=10'}
hasBin: true
- semver@7.6.2:
- resolution: {integrity: sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==}
+ semver@7.6.3:
+ resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==}
engines: {node: '>=10'}
hasBin: true
@@ -4316,6 +4691,9 @@ packages:
resolution: {integrity: sha512-d76wfhgUuGypKqY72Unm5LFnMpACbdxXsLPcL27pOsSrmVqH3PztFp1uq+Z22suk15h7vXmTesuh2aEjdCqb5w==}
hasBin: true
+ sorted-array-functions@1.3.0:
+ resolution: {integrity: sha512-2sqgzeFlid6N4Z2fUQ1cvFmTOLRi/sEDzSQ0OKYchqgoPmQBVyM3959qYx3fpS6Esef80KjmpgPeEr028dP3OA==}
+
source-map-js@1.2.1:
resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}
engines: {node: '>=0.10.0'}
@@ -4349,6 +4727,10 @@ packages:
stackframe@1.3.4:
resolution: {integrity: sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==}
+ statuses@1.5.0:
+ resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==}
+ engines: {node: '>= 0.6'}
+
statuses@2.0.1:
resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==}
engines: {node: '>= 0.8'}
@@ -4360,6 +4742,10 @@ packages:
resolution: {integrity: sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==}
engines: {node: '>=18'}
+ streamroller@3.1.5:
+ resolution: {integrity: sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw==}
+ engines: {node: '>=8.0'}
+
string-argv@0.3.2:
resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==}
engines: {node: '>=0.6.19'}
@@ -4570,6 +4956,10 @@ packages:
tslib@2.6.3:
resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==}
+ tsscmp@1.0.6:
+ resolution: {integrity: sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==}
+ engines: {node: '>=0.6.x'}
+
type-fest@3.13.1:
resolution: {integrity: sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==}
engines: {node: '>=14.16'}
@@ -4594,6 +4984,10 @@ packages:
unified@10.1.2:
resolution: {integrity: sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==}
+ union@0.5.0:
+ resolution: {integrity: sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA==}
+ engines: {node: '>= 0.8.0'}
+
unist-util-generated@2.0.1:
resolution: {integrity: sha512-qF72kLmPxAw0oN2fwpWIqbXAVyEqUzDHMsbtPvOudIlUzXYFIeQIuxXQCRCFh22B7cixvU0MG7m3MW8FTq/S+A==}
@@ -4636,6 +5030,10 @@ packages:
resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==}
engines: {node: '>= 0.8'}
+ upath@2.0.1:
+ resolution: {integrity: sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==}
+ engines: {node: '>=4'}
+
update-browserslist-db@1.1.0:
resolution: {integrity: sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==}
hasBin: true
@@ -4645,6 +5043,9 @@ packages:
uri-js@4.4.1:
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
+ url-join@4.0.1:
+ resolution: {integrity: sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==}
+
use-callback-ref@1.3.2:
resolution: {integrity: sha512-elOQwe6Q8gqZgDA8mrh44qRTQqpIHDcZ3hXTLjBe1i4ph8XpNJnO+aQf3NaG+lriLopI4HMx9VjQLfPQ6vhnoA==}
engines: {node: '>=10'}
@@ -4791,6 +5192,10 @@ packages:
webpack-cli:
optional: true
+ whatwg-encoding@2.0.0:
+ resolution: {integrity: sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==}
+ engines: {node: '>=12'}
+
which@1.3.1:
resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==}
hasBin: true
@@ -4816,6 +5221,18 @@ packages:
wrappy@1.0.2:
resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
+ ws@8.18.0:
+ resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==}
+ engines: {node: '>=10.0.0'}
+ peerDependencies:
+ bufferutil: ^4.0.1
+ utf-8-validate: '>=5.0.2'
+ peerDependenciesMeta:
+ bufferutil:
+ optional: true
+ utf-8-validate:
+ optional: true
+
xtend@4.0.2:
resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==}
engines: {node: '>=0.4'}
@@ -4850,6 +5267,10 @@ packages:
resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==}
engines: {node: '>=12'}
+ ylru@1.4.0:
+ resolution: {integrity: sha512-2OQsPNEmBCvXuFlIni/a+Rn+R2pHW9INm0BxXJ4hVDA8TirqMj+J/Rp9ItLatT/5pZqWwefVrTQcHpixsxnVlA==}
+ engines: {node: '>= 4.0.0'}
+
yocto-queue@1.1.1:
resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==}
engines: {node: '>=12.20'}
@@ -5063,7 +5484,7 @@ snapshots:
outdent: 0.5.0
prettier: 2.8.8
resolve-from: 5.0.0
- semver: 7.6.2
+ semver: 7.6.3
'@changesets/assemble-release-plan@6.0.4':
dependencies:
@@ -5072,7 +5493,7 @@ snapshots:
'@changesets/should-skip-package': 0.1.1
'@changesets/types': 6.0.0
'@manypkg/get-packages': 1.1.3
- semver: 7.6.2
+ semver: 7.6.3
'@changesets/changelog-git@0.2.0':
dependencies:
@@ -5105,7 +5526,7 @@ snapshots:
package-manager-detector: 0.2.0
picocolors: 1.1.0
resolve-from: 5.0.0
- semver: 7.6.2
+ semver: 7.6.3
spawndamnit: 2.0.0
term-size: 2.2.1
@@ -5128,7 +5549,7 @@ snapshots:
'@changesets/types': 6.0.0
'@manypkg/get-packages': 1.1.3
picocolors: 1.1.0
- semver: 7.6.2
+ semver: 7.6.3
'@changesets/get-release-plan@4.0.4':
dependencies:
@@ -5193,7 +5614,7 @@ snapshots:
'@codspeed/core@3.1.1':
dependencies:
- axios: 1.7.5
+ axios: 1.7.7
find-up: 6.3.0
form-data: 4.0.0
node-gyp-build: 4.8.2
@@ -5442,22 +5863,148 @@ snapshots:
lodash: 4.17.21
rslog: 1.2.3
+ '@module-federation/bridge-react-webpack-plugin@0.6.11':
+ dependencies:
+ '@module-federation/sdk': 0.6.11
+ '@types/semver': 7.5.8
+ semver: 7.6.3
+
+ '@module-federation/data-prefetch@0.6.11(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
+ dependencies:
+ '@module-federation/runtime': 0.6.11
+ '@module-federation/sdk': 0.6.11
+ fs-extra: 9.1.0
+ react: 18.3.1
+ react-dom: 18.3.1(react@18.3.1)
+
+ '@module-federation/dts-plugin@0.6.11(typescript@5.6.3)':
+ dependencies:
+ '@module-federation/managers': 0.6.11
+ '@module-federation/sdk': 0.6.11
+ '@module-federation/third-party-dts-extractor': 0.6.11
+ adm-zip: 0.5.16
+ ansi-colors: 4.1.3
+ axios: 1.7.7
+ chalk: 3.0.0
+ fs-extra: 9.1.0
+ isomorphic-ws: 5.0.0(ws@8.18.0)
+ koa: 2.15.3
+ lodash.clonedeepwith: 4.5.0
+ log4js: 6.9.1
+ node-schedule: 2.1.1
+ rambda: 9.3.0
+ typescript: 5.6.3
+ ws: 8.18.0
+ transitivePeerDependencies:
+ - bufferutil
+ - debug
+ - supports-color
+ - utf-8-validate
+
+ '@module-federation/enhanced@0.6.11(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0)':
+ dependencies:
+ '@module-federation/bridge-react-webpack-plugin': 0.6.11
+ '@module-federation/data-prefetch': 0.6.11(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ '@module-federation/dts-plugin': 0.6.11(typescript@5.6.3)
+ '@module-federation/managers': 0.6.11
+ '@module-federation/manifest': 0.6.11(typescript@5.6.3)
+ '@module-federation/rspack': 0.6.11(typescript@5.6.3)
+ '@module-federation/runtime-tools': 0.6.11
+ '@module-federation/sdk': 0.6.11
+ btoa: 1.2.1
+ upath: 2.0.1
+ optionalDependencies:
+ typescript: 5.6.3
+ webpack: 5.94.0
+ transitivePeerDependencies:
+ - bufferutil
+ - debug
+ - react
+ - react-dom
+ - supports-color
+ - utf-8-validate
+
+ '@module-federation/managers@0.6.11':
+ dependencies:
+ '@module-federation/sdk': 0.6.11
+ find-pkg: 2.0.0
+ fs-extra: 9.1.0
+
+ '@module-federation/manifest@0.6.11(typescript@5.6.3)':
+ dependencies:
+ '@module-federation/dts-plugin': 0.6.11(typescript@5.6.3)
+ '@module-federation/managers': 0.6.11
+ '@module-federation/sdk': 0.6.11
+ chalk: 3.0.0
+ find-pkg: 2.0.0
+ transitivePeerDependencies:
+ - bufferutil
+ - debug
+ - supports-color
+ - typescript
+ - utf-8-validate
+ - vue-tsc
+
+ '@module-federation/rsbuild-plugin@0.0.2(@module-federation/enhanced@0.6.11(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.0.14)':
+ dependencies:
+ '@module-federation/enhanced': 0.6.11(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0)
+ '@module-federation/sdk': 0.6.11
+ '@rsbuild/core': 1.0.14
+
+ '@module-federation/rspack@0.6.11(typescript@5.6.3)':
+ dependencies:
+ '@module-federation/bridge-react-webpack-plugin': 0.6.11
+ '@module-federation/dts-plugin': 0.6.11(typescript@5.6.3)
+ '@module-federation/managers': 0.6.11
+ '@module-federation/manifest': 0.6.11(typescript@5.6.3)
+ '@module-federation/runtime-tools': 0.6.11
+ '@module-federation/sdk': 0.6.11
+ optionalDependencies:
+ typescript: 5.6.3
+ transitivePeerDependencies:
+ - bufferutil
+ - debug
+ - supports-color
+ - utf-8-validate
+
'@module-federation/runtime-tools@0.5.1':
dependencies:
'@module-federation/runtime': 0.5.1
'@module-federation/webpack-bundler-runtime': 0.5.1
+ '@module-federation/runtime-tools@0.6.11':
+ dependencies:
+ '@module-federation/runtime': 0.6.11
+ '@module-federation/webpack-bundler-runtime': 0.6.11
+
'@module-federation/runtime@0.5.1':
dependencies:
'@module-federation/sdk': 0.5.1
+ '@module-federation/runtime@0.6.11':
+ dependencies:
+ '@module-federation/sdk': 0.6.11
+
'@module-federation/sdk@0.5.1': {}
+ '@module-federation/sdk@0.6.11': {}
+
+ '@module-federation/third-party-dts-extractor@0.6.11':
+ dependencies:
+ find-pkg: 2.0.0
+ fs-extra: 9.1.0
+ resolve: 1.22.8
+
'@module-federation/webpack-bundler-runtime@0.5.1':
dependencies:
'@module-federation/runtime': 0.5.1
'@module-federation/sdk': 0.5.1
+ '@module-federation/webpack-bundler-runtime@0.6.11':
+ dependencies:
+ '@module-federation/runtime': 0.6.11
+ '@module-federation/sdk': 0.6.11
+
'@napi-rs/wasm-runtime@0.2.4':
dependencies:
'@emnapi/core': 1.2.0
@@ -6132,6 +6679,8 @@ snapshots:
'@types/prop-types': 15.7.12
csstype: 3.1.3
+ '@types/semver@7.5.8': {}
+
'@types/send@0.17.4':
dependencies:
'@types/mime': 1.3.5
@@ -6295,6 +6844,8 @@ snapshots:
acorn@8.12.1: {}
+ adm-zip@0.5.16: {}
+
ajv-draft-04@1.0.0(ajv@8.13.0):
optionalDependencies:
ajv: 8.13.0
@@ -6378,9 +6929,15 @@ snapshots:
astring@1.9.0: {}
+ async@2.6.4:
+ dependencies:
+ lodash: 4.17.21
+
asynckit@0.4.0: {}
- axios@1.7.5:
+ at-least-node@1.0.0: {}
+
+ axios@1.7.7:
dependencies:
follow-redirects: 1.15.6
form-data: 4.0.0
@@ -6398,6 +6955,10 @@ snapshots:
base64-js@1.5.1: {}
+ basic-auth@2.0.1:
+ dependencies:
+ safe-buffer: 5.1.2
+
better-path-resolve@1.0.0:
dependencies:
is-windows: 1.0.2
@@ -6453,6 +7014,8 @@ snapshots:
node-releases: 2.0.18
update-browserslist-db: 1.1.0(browserslist@4.23.3)
+ btoa@1.2.1: {}
+
buffer-builder@0.2.0: {}
buffer-from@1.1.2: {}
@@ -6466,6 +7029,11 @@ snapshots:
cac@6.7.14: {}
+ cache-content-type@1.0.1:
+ dependencies:
+ mime-types: 2.1.35
+ ylru: 1.4.0
+
call-bind@1.0.7:
dependencies:
es-define-property: 1.0.0
@@ -6498,6 +7066,11 @@ snapshots:
escape-string-regexp: 1.0.5
supports-color: 5.5.0
+ chalk@3.0.0:
+ dependencies:
+ ansi-styles: 4.3.0
+ supports-color: 7.2.0
+
chalk@4.1.2:
dependencies:
ansi-styles: 4.3.0
@@ -6529,7 +7102,7 @@ snapshots:
edit-json-file: 1.8.0
globby: 13.2.2
js-yaml: 4.1.0
- semver: 7.6.2
+ semver: 7.6.3
table: 6.8.2
type-fest: 3.13.1
@@ -6571,6 +7144,8 @@ snapshots:
clone@1.0.4: {}
+ co@4.6.0: {}
+
color-convert@1.9.3:
dependencies:
color-name: 1.1.3
@@ -6633,12 +7208,19 @@ snapshots:
cookie@0.7.1: {}
+ cookies@0.9.1:
+ dependencies:
+ depd: 2.0.0
+ keygrip: 1.1.0
+
copy-to-clipboard@3.3.3:
dependencies:
toggle-selection: 1.0.6
core-js@3.38.1: {}
+ corser@2.0.1: {}
+
cosmiconfig@8.3.6(typescript@5.6.3):
dependencies:
import-fresh: 3.3.0
@@ -6650,6 +7232,10 @@ snapshots:
create-rstack@1.0.6: {}
+ cron-parser@4.9.0:
+ dependencies:
+ luxon: 3.5.0
+
cross-env@7.0.3:
dependencies:
cross-spawn: 7.0.3
@@ -6698,12 +7284,18 @@ snapshots:
data-uri-to-buffer@4.0.1: {}
+ date-format@4.0.14: {}
+
dayjs@1.11.13: {}
debug@2.6.9:
dependencies:
ms: 2.0.0
+ debug@3.2.7:
+ dependencies:
+ ms: 2.1.3
+
debug@4.3.7:
dependencies:
ms: 2.1.3
@@ -6714,6 +7306,8 @@ snapshots:
deep-eql@5.0.2: {}
+ deep-equal@1.0.1: {}
+
deepmerge@4.3.1: {}
defaults@1.0.4:
@@ -6730,6 +7324,10 @@ snapshots:
delayed-stream@1.0.0: {}
+ delegates@1.0.0: {}
+
+ depd@1.1.2: {}
+
depd@2.0.0: {}
dequal@2.0.3: {}
@@ -6952,6 +7550,8 @@ snapshots:
etag@1.8.1: {}
+ eventemitter3@4.0.7: {}
+
events@3.3.0: {}
execa@5.1.1:
@@ -6966,6 +7566,10 @@ snapshots:
signal-exit: 3.0.7
strip-final-newline: 2.0.0
+ expand-tilde@2.0.2:
+ dependencies:
+ homedir-polyfill: 1.0.3
+
express@4.21.1:
dependencies:
accepts: 1.3.8
@@ -7061,6 +7665,14 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ find-file-up@2.0.1:
+ dependencies:
+ resolve-dir: 1.0.1
+
+ find-pkg@2.0.0:
+ dependencies:
+ find-file-up: 2.0.1
+
find-up@4.1.0:
dependencies:
locate-path: 5.0.0
@@ -7075,6 +7687,8 @@ snapshots:
flat@5.0.2: {}
+ flatted@3.3.1: {}
+
flexsearch@0.7.43: {}
focus-lock@1.3.5:
@@ -7135,6 +7749,13 @@ snapshots:
jsonfile: 4.0.0
universalify: 0.1.2
+ fs-extra@9.1.0:
+ dependencies:
+ at-least-node: 1.0.0
+ graceful-fs: 4.2.11
+ jsonfile: 6.1.0
+ universalify: 2.0.1
+
fsevents@2.3.2:
optional: true
@@ -7186,6 +7807,20 @@ snapshots:
package-json-from-dist: 1.0.1
path-scurry: 1.11.1
+ global-modules@1.0.0:
+ dependencies:
+ global-prefix: 1.0.2
+ is-windows: 1.0.2
+ resolve-dir: 1.0.1
+
+ global-prefix@1.0.2:
+ dependencies:
+ expand-tilde: 2.0.2
+ homedir-polyfill: 1.0.3
+ ini: 1.3.8
+ is-windows: 1.0.2
+ which: 1.3.1
+
globals@11.12.0: {}
globby@11.1.0:
@@ -7230,6 +7865,10 @@ snapshots:
has-symbols@1.0.3: {}
+ has-tostringtag@1.0.2:
+ dependencies:
+ has-symbols: 1.0.3
+
hasown@2.0.2:
dependencies:
function-bind: 1.1.2
@@ -7370,12 +8009,22 @@ snapshots:
property-information: 6.5.0
space-separated-tokens: 2.0.2
+ he@1.2.0: {}
+
highlight.js@10.7.3: {}
hoist-non-react-statics@3.3.2:
dependencies:
react-is: 16.13.1
+ homedir-polyfill@1.0.3:
+ dependencies:
+ parse-passwd: 1.0.0
+
+ html-encoding-sniffer@3.0.0:
+ dependencies:
+ whatwg-encoding: 2.0.0
+
html-entities@2.5.2: {}
html-tags@3.3.1: {}
@@ -7410,6 +8059,19 @@ snapshots:
htmlparser2: 6.1.0
react: 18.3.1
+ http-assert@1.5.0:
+ dependencies:
+ deep-equal: 1.0.1
+ http-errors: 1.8.1
+
+ http-errors@1.8.1:
+ dependencies:
+ depd: 1.1.2
+ inherits: 2.0.4
+ setprototypeof: 1.2.0
+ statuses: 1.5.0
+ toidentifier: 1.0.1
+
http-errors@2.0.0:
dependencies:
depd: 2.0.0
@@ -7418,6 +8080,33 @@ snapshots:
statuses: 2.0.1
toidentifier: 1.0.1
+ http-proxy@1.18.1:
+ dependencies:
+ eventemitter3: 4.0.7
+ follow-redirects: 1.15.6
+ requires-port: 1.0.0
+ transitivePeerDependencies:
+ - debug
+
+ http-server@14.1.1:
+ dependencies:
+ basic-auth: 2.0.1
+ chalk: 4.1.2
+ corser: 2.0.1
+ he: 1.2.0
+ html-encoding-sniffer: 3.0.0
+ http-proxy: 1.18.1
+ mime: 1.6.0
+ minimist: 1.2.8
+ opener: 1.5.2
+ portfinder: 1.0.32
+ secure-compare: 3.0.1
+ union: 0.5.0
+ url-join: 4.0.1
+ transitivePeerDependencies:
+ - debug
+ - supports-color
+
human-id@1.0.2: {}
human-signals@2.1.0: {}
@@ -7428,6 +8117,10 @@ snapshots:
dependencies:
safer-buffer: 2.1.2
+ iconv-lite@0.6.3:
+ dependencies:
+ safer-buffer: 2.1.2
+
ieee754@1.2.1: {}
ignore@5.3.1: {}
@@ -7443,6 +8136,8 @@ snapshots:
inherits@2.0.4: {}
+ ini@1.3.8: {}
+
inline-style-parser@0.1.1: {}
invariant@2.2.4:
@@ -7493,6 +8188,10 @@ snapshots:
is-fullwidth-code-point@3.0.0: {}
+ is-generator-function@1.0.10:
+ dependencies:
+ has-tostringtag: 1.0.2
+
is-glob@4.0.3:
dependencies:
is-extglob: 2.1.1
@@ -7545,6 +8244,10 @@ snapshots:
isobject@3.0.1: {}
+ isomorphic-ws@5.0.0(ws@8.18.0):
+ dependencies:
+ ws: 8.18.0
+
iterate-object@1.3.4: {}
jackspeak@3.4.3:
@@ -7605,10 +8308,49 @@ snapshots:
optionalDependencies:
graceful-fs: 4.2.11
+ keygrip@1.1.0:
+ dependencies:
+ tsscmp: 1.0.6
+
kind-of@6.0.3: {}
kleur@4.1.5: {}
+ koa-compose@4.1.0: {}
+
+ koa-convert@2.0.0:
+ dependencies:
+ co: 4.6.0
+ koa-compose: 4.1.0
+
+ koa@2.15.3:
+ dependencies:
+ accepts: 1.3.8
+ cache-content-type: 1.0.1
+ content-disposition: 0.5.4
+ content-type: 1.0.5
+ cookies: 0.9.1
+ debug: 4.3.7
+ delegates: 1.0.0
+ depd: 2.0.0
+ destroy: 1.2.0
+ encodeurl: 1.0.2
+ escape-html: 1.0.3
+ fresh: 0.5.2
+ http-assert: 1.5.0
+ http-errors: 1.8.1
+ is-generator-function: 1.0.10
+ koa-compose: 4.1.0
+ koa-convert: 2.0.0
+ on-finished: 2.4.1
+ only: 0.0.2
+ parseurl: 1.3.3
+ statuses: 1.5.0
+ type-is: 1.6.18
+ vary: 1.1.2
+ transitivePeerDependencies:
+ - supports-color
+
leac@0.6.0: {}
lilconfig@2.1.0: {}
@@ -7637,6 +8379,8 @@ snapshots:
lodash-es@4.17.21: {}
+ lodash.clonedeepwith@4.5.0: {}
+
lodash.startcase@4.4.0: {}
lodash.truncate@4.4.2: {}
@@ -7653,6 +8397,18 @@ snapshots:
chalk: 5.3.0
is-unicode-supported: 1.3.0
+ log4js@6.9.1:
+ dependencies:
+ date-format: 4.0.14
+ debug: 4.3.7
+ flatted: 3.3.1
+ rfdc: 1.4.1
+ streamroller: 3.1.5
+ transitivePeerDependencies:
+ - supports-color
+
+ long-timeout@0.1.1: {}
+
longest-streak@3.1.0: {}
loose-envify@1.4.0:
@@ -7687,6 +8443,8 @@ snapshots:
dependencies:
yallist: 4.0.0
+ luxon@3.5.0: {}
+
magic-string@0.30.12:
dependencies:
'@jridgewell/sourcemap-codec': 1.5.0
@@ -8167,6 +8925,10 @@ snapshots:
minipass@7.1.2: {}
+ mkdirp@0.5.6:
+ dependencies:
+ minimist: 1.2.8
+
mri@1.2.0: {}
ms@2.0.0: {}
@@ -8208,6 +8970,12 @@ snapshots:
node-releases@2.0.18: {}
+ node-schedule@2.1.1:
+ dependencies:
+ cron-parser: 4.9.0
+ long-timeout: 0.1.1
+ sorted-array-functions: 1.3.0
+
normalize-path@3.0.0: {}
npm-run-path@4.0.1:
@@ -8228,7 +8996,7 @@ snapshots:
'@yarnpkg/lockfile': 1.1.0
'@yarnpkg/parsers': 3.0.0-rc.46
'@zkochan/js-yaml': 0.0.7
- axios: 1.7.5
+ axios: 1.7.7
chalk: 4.1.2
cli-cursor: 3.1.0
cli-spinners: 2.6.1
@@ -8248,7 +9016,7 @@ snapshots:
npm-run-path: 4.0.1
open: 8.4.2
ora: 5.3.0
- semver: 7.6.2
+ semver: 7.6.3
string-width: 4.2.3
tar-stream: 2.2.0
tmp: 0.2.3
@@ -8292,12 +9060,16 @@ snapshots:
dependencies:
mimic-function: 5.0.1
+ only@0.0.2: {}
+
open@8.4.2:
dependencies:
define-lazy-prop: 2.0.0
is-docker: 2.2.1
is-wsl: 2.2.0
+ opener@1.5.2: {}
+
ora@5.3.0:
dependencies:
bl: 4.1.0
@@ -8384,6 +9156,8 @@ snapshots:
json-parse-even-better-errors: 2.3.1
lines-and-columns: 1.2.4
+ parse-passwd@1.0.0: {}
+
parse5@6.0.1: {}
parse5@7.1.2:
@@ -8446,6 +9220,14 @@ snapshots:
optionalDependencies:
fsevents: 2.3.2
+ portfinder@1.0.32:
+ dependencies:
+ async: 2.6.4
+ debug: 3.2.7
+ mkdirp: 0.5.6
+ transitivePeerDependencies:
+ - supports-color
+
postcss-alias@2.0.0:
dependencies:
postcss: 6.0.23
@@ -8557,6 +9339,8 @@ snapshots:
dependencies:
w-json: 1.3.10
+ rambda@9.3.0: {}
+
randombytes@2.1.0:
dependencies:
safe-buffer: 5.2.1
@@ -8758,8 +9542,15 @@ snapshots:
require-from-string@2.0.2: {}
+ requires-port@1.0.0: {}
+
resize-observer-polyfill@1.5.1: {}
+ resolve-dir@1.0.1:
+ dependencies:
+ expand-tilde: 2.0.2
+ global-modules: 1.0.0
+
resolve-from@4.0.0: {}
resolve-from@5.0.0: {}
@@ -8782,6 +9573,8 @@ snapshots:
reusify@1.0.4: {}
+ rfdc@1.4.1: {}
+
rollup-plugin-dts@6.1.1(rollup@4.18.1)(typescript@5.6.3):
dependencies:
magic-string: 0.30.12
@@ -8858,6 +9651,8 @@ snapshots:
dependencies:
mri: 1.2.0
+ safe-buffer@5.1.2: {}
+
safe-buffer@5.2.1: {}
safer-buffer@2.1.2: {}
@@ -8972,6 +9767,8 @@ snapshots:
extend-shallow: 2.0.1
kind-of: 6.0.3
+ secure-compare@3.0.1: {}
+
selderee@0.11.0:
dependencies:
parseley: 0.12.1
@@ -8982,7 +9779,7 @@ snapshots:
dependencies:
lru-cache: 6.0.0
- semver@7.6.2: {}
+ semver@7.6.3: {}
send@0.19.0:
dependencies:
@@ -9089,9 +9886,11 @@ snapshots:
git-hooks-list: 3.1.0
globby: 13.2.2
is-plain-obj: 4.1.0
- semver: 7.6.2
+ semver: 7.6.3
sort-object-keys: 1.1.3
+ sorted-array-functions@1.3.0: {}
+
source-map-js@1.2.1: {}
source-map-support@0.5.21:
@@ -9118,12 +9917,22 @@ snapshots:
stackframe@1.3.4: {}
+ statuses@1.5.0: {}
+
statuses@2.0.1: {}
std-env@3.7.0: {}
stdin-discarder@0.2.2: {}
+ streamroller@3.1.5:
+ dependencies:
+ date-format: 4.0.14
+ debug: 4.3.7
+ fs-extra: 8.1.0
+ transitivePeerDependencies:
+ - supports-color
+
string-argv@0.3.2: {}
string-width@4.2.3:
@@ -9337,6 +10146,8 @@ snapshots:
tslib@2.6.3: {}
+ tsscmp@1.0.6: {}
+
type-fest@3.13.1: {}
type-is@1.6.18:
@@ -9360,6 +10171,10 @@ snapshots:
trough: 2.2.0
vfile: 5.3.7
+ union@0.5.0:
+ dependencies:
+ qs: 6.13.0
+
unist-util-generated@2.0.1: {}
unist-util-is@5.2.1:
@@ -9408,6 +10223,8 @@ snapshots:
unpipe@1.0.0: {}
+ upath@2.0.1: {}
+
update-browserslist-db@1.1.0(browserslist@4.23.3):
dependencies:
browserslist: 4.23.3
@@ -9418,6 +10235,8 @@ snapshots:
dependencies:
punycode: 2.3.1
+ url-join@4.0.1: {}
+
use-callback-ref@1.3.2(@types/react@18.3.11)(react@18.3.1):
dependencies:
react: 18.3.1
@@ -9586,6 +10405,10 @@ snapshots:
- esbuild
- uglify-js
+ whatwg-encoding@2.0.0:
+ dependencies:
+ iconv-lite: 0.6.3
+
which@1.3.1:
dependencies:
isexe: 2.0.0
@@ -9613,6 +10436,8 @@ snapshots:
wrappy@1.0.2: {}
+ ws@8.18.0: {}
+
xtend@4.0.2: {}
y18n@5.0.8: {}
@@ -9642,6 +10467,8 @@ snapshots:
y18n: 5.0.8
yargs-parser: 21.1.1
+ ylru@1.4.0: {}
+
yocto-queue@1.1.1: {}
zwitch@2.0.4: {}
diff --git a/tests/benchmark/index.bench.ts b/tests/benchmark/index.bench.ts
index 8930a268e..5956646db 100644
--- a/tests/benchmark/index.bench.ts
+++ b/tests/benchmark/index.bench.ts
@@ -9,6 +9,16 @@ const disableDts = (rslibConfig: RslibConfig) => {
}
};
+const onlyEnableMF = (rslibConfig: RslibConfig) => {
+ const length = rslibConfig.lib.length;
+ for (let i = length - 1; i >= 0; i--) {
+ if (rslibConfig.lib[i] && rslibConfig.lib[i]!.format !== 'mf') {
+ rslibConfig.lib.splice(i, 1);
+ }
+ }
+ disableDts(rslibConfig);
+};
+
const iterations = process.env.CI ? 10 : 50;
describe('benchmark Rslib in examples', () => {
@@ -44,4 +54,12 @@ describe('benchmark Rslib in examples', () => {
},
{ iterations },
);
+ bench(
+ 'examples/module-federation/mf-react-component',
+ async () => {
+ const cwd = getCwdByExample('module-federation/mf-react-component');
+ await rslibBuild({ cwd, modifyConfig: onlyEnableMF });
+ },
+ { iterations },
+ );
});
diff --git a/tests/e2e/module-federation/constant.ts b/tests/e2e/module-federation/constant.ts
new file mode 100644
index 000000000..8fb8c04b9
--- /dev/null
+++ b/tests/e2e/module-federation/constant.ts
@@ -0,0 +1,3 @@
+export const libText = 'Counter From Rslib MF Format';
+
+export const remoteText = 'MF Remote App loaded by Rslib MF Format';
diff --git a/tests/e2e/module-federation/index.pw.test.ts b/tests/e2e/module-federation/index.pw.test.ts
new file mode 100644
index 000000000..362038852
--- /dev/null
+++ b/tests/e2e/module-federation/index.pw.test.ts
@@ -0,0 +1,35 @@
+///
+import { expect, test } from '@playwright/test';
+
+import { libText, remoteText } from './constant';
+
+test.beforeEach(async ({ page }) => {
+ const openUrl = 'http://localhost:3000';
+ await page.goto(openUrl);
+});
+
+test('test rslib module render correctly', async ({ page }) => {
+ const libTitleElement = await page.waitForSelector('#mf-e2e-lib-title');
+ const libContentElement = await page.waitForSelector('#mf-e2e-lib-content');
+ const libTitleText = await libTitleElement.innerText();
+ const libContentText = await libContentElement.innerText();
+ expect(libTitleText).toEqual(expect.stringContaining(libText));
+ expect(libContentText).toBe('0');
+
+ const libIncreaseElement = await page.waitForSelector('#mf-e2e-lib-increase');
+ const libDecreaseElement = await page.waitForSelector('#mf-e2e-lib-decrease');
+
+ await libIncreaseElement.click();
+ const libIncreaseContent = await libContentElement.innerText();
+ expect(libIncreaseContent).toBe('1');
+
+ await libDecreaseElement.click();
+ const libDecreaseContent = await libContentElement.innerText();
+ expect(libDecreaseContent).toBe('0');
+});
+
+test('test rslib use mf runtime to load remote module', async ({ page }) => {
+ const runtimeElement = await page.waitForSelector('#mf-e2e-remote');
+ const runtimeText = await runtimeElement.innerText();
+ expect(runtimeText).toEqual(expect.stringContaining(remoteText));
+});
diff --git a/tests/playwright.config.ts b/tests/playwright.config.ts
index 2440f1147..2c2b06ac7 100644
--- a/tests/playwright.config.ts
+++ b/tests/playwright.config.ts
@@ -7,4 +7,21 @@ export default defineConfig({
retries: process.env.CI ? 3 : 0,
// Print line for each test being run in CI
reporter: 'list',
+ webServer: [
+ {
+ command: 'cd ../examples/module-federation && npm run dev:host',
+ url: 'http://127.0.0.1:3000',
+ timeout: 120 * 1000,
+ },
+ {
+ command: 'cd ../examples/module-federation && npm run dev:lib',
+ url: 'http://127.0.0.1:3001',
+ timeout: 120 * 1000,
+ },
+ {
+ command: 'cd ../examples/module-federation && npm run dev:remote',
+ url: 'http://127.0.0.1:3002',
+ timeout: 120 * 1000,
+ },
+ ],
});
diff --git a/website/docs/en/config/_meta.json b/website/docs/en/config/_meta.json
index 392f19b60..60cbc6f05 100644
--- a/website/docs/en/config/_meta.json
+++ b/website/docs/en/config/_meta.json
@@ -1,12 +1,12 @@
[
- {
- "type": "file",
- "name": "index",
- "label": "Overview"
- },
- {
- "type": "dir",
- "name": "lib",
- "label": "lib"
- }
- ]
\ No newline at end of file
+ {
+ "type": "file",
+ "name": "index",
+ "label": "Overview"
+ },
+ {
+ "type": "dir",
+ "name": "lib",
+ "label": "lib"
+ }
+]
diff --git a/website/docs/en/guide/advanced/_meta.json b/website/docs/en/guide/advanced/_meta.json
index fe51488c7..cf5a3dc6b 100644
--- a/website/docs/en/guide/advanced/_meta.json
+++ b/website/docs/en/guide/advanced/_meta.json
@@ -1 +1 @@
-[]
+["module-federation"]
diff --git a/website/docs/en/guide/advanced/module-federation.mdx b/website/docs/en/guide/advanced/module-federation.mdx
new file mode 100644
index 000000000..7885dbf48
--- /dev/null
+++ b/website/docs/en/guide/advanced/module-federation.mdx
@@ -0,0 +1,158 @@
+# Module Federation
+
+This chapter introduces how to build Module Federation output in Rslib.
+
+## Glossary
+
+Module Federation is a JavaScript application divide-and-conquer architecture pattern (similar to server-side microservices) that allows you to share code and resources between multiple JavaScript applications (or Micro-Frontend).
+
+## Usage scenarios
+
+Module federation has some typical usage scenarios, including:
+
+- Allows independent applications (called "Micro-Frontend" in the Micro-Frontend architecture) to share modules without having to recompile the entire application.
+- Different teams work on different parts of the same application without having to recompile the entire application.
+- Dynamic code loading and sharing between applications at runtime.
+
+Module Federation can help you:
+
+- Reduce code duplication
+- Improve code maintainability
+- Reduce the overall size of the application
+- Improve application performance
+
+## Quick Start
+
+First install the Module Federation Rsbuild Plugin (Rslib is based on Rsbuild).
+
+import { PackageManagerTabs } from '@theme';
+
+
+
+Add the plugin to the `rslib.config.ts` file:
+
+```ts title='rslib.config.ts'
+import { pluginModuleFederation } from '@module-federation/rsbuild-plugin';
+import { pluginReact } from '@rsbuild/plugin-react';
+import { defineConfig } from '@rslib/core';
+
+export default defineConfig({
+ lib: [
+ // ... other format
+ {
+ format: 'mf',
+ output: {
+ distPath: {
+ root: './dist/mf',
+ },
+ // add your assetPrefix here
+ assetPrefix: 'http://localhost:3001/mf',
+ },
+ plugins: [
+ pluginModuleFederation({
+ name: 'rslib_provider',
+ exposes: {
+ // add expose here
+ },
+ // can not add 'remote' here, because you may build 'esm' or 'cjs' assets in one build.
+ // if you want the rslib package use remote module, please see below.
+ shared: {
+ react: {
+ singleton: true,
+ },
+ 'react-dom': {
+ singleton: true,
+ },
+ },
+ }),
+ ],
+ },
+ ],
+ plugins: [pluginReact()],
+});
+```
+
+In this way, we have completed the integration of Rslib Module as a producer. After the construction is completed, we can see that the mf directory has been added to the product, and consumers can directly consume this package
+
+In the above example we added a new `format: 'mf'` , which will help you add an additional Module Federation product, while also configuring the format of `cjs` and `esm` , which does not conflict.
+
+However, if you want this Rslib Module to consume other producers at the same time, do not use the build configuration `remote` parameter, because in other formats, this may cause errors, please refer to the example below using the Module Federation runtime
+
+## Consume other Module Federation modules
+
+Because there are multiple formats in Rslib, if you configure the `remote` parameter to consume other modules during construction, it may not work properly in all formats. It is recommended to access through the [Module Federation Runtime](https://module-federation.io/guide/basic/runtime.html)
+
+First install the runtime dependencies
+
+
+
+Then consume other Module Federation modules at runtime, for example
+
+```ts
+import { init, loadRemote } from '@module-federation/enhanced/runtime';
+import { Suspense, createElement, lazy } from 'react';
+
+init({
+ name: 'rslib_provider',
+ remotes: [
+ {
+ name: 'mf_remote',
+ entry: 'http://localhost:3002/mf-manifest.json',
+ },
+ ],
+});
+
+export const Counter: React.FC = () => {
+ return (
+
+ loading
}>
+ {createElement(
+ lazy(
+ () =>
+ loadRemote('mf_remote') as Promise<{
+ default: React.FC;
+ }>,
+ ),
+ )}
+
+
+ );
+};
+```
+
+This ensures that modules can be loaded as expected in multiple formats.
+
+## FAQs
+
+If the Rslib producer is built with build, this means that the `process.env.NODE_ENV` of the producer is `production` . If the consumer is started in dev mode at this time,
+Due to the shared loading policy of Module Federation being `version-first` by default, there may be problems loading into different modes of react and react-dom (e.g. react in development mode, react-dom in production mode).
+You can set up [shareStrategy](https://module-federation.io/configure/sharestrategy) at the consumer to solve this problem, but make sure you fully understand this configuration
+
+```ts
+pluginModuleFederation({
+ // ...
+ shareStrategy: 'loaded-first',
+}),
+```
+
+## Examples
+
+[Rslib Module Federation Example](https://github.com/web-infra-dev/rslib/tree/main/examples/module-federation)
+
+- `mf-host`: Rsbuild App Consumer
+- `mf-react-component`: Rslib Module, which is both a producer and a consumer, provides the module to the `mf-host` as a producer, and consumes the `mf-remote`
+- `mf-remote`: Rsbuild App Producer
diff --git a/website/docs/zh/guide/_meta.json b/website/docs/zh/guide/_meta.json
index 2c07216b4..da794eff1 100644
--- a/website/docs/zh/guide/_meta.json
+++ b/website/docs/zh/guide/_meta.json
@@ -8,5 +8,10 @@
"type": "dir",
"name": "basic",
"label": "基础"
+ },
+ {
+ "type": "dir",
+ "name": "advanced",
+ "label": "进阶"
}
]
diff --git a/website/docs/zh/guide/advanced/_meta.json b/website/docs/zh/guide/advanced/_meta.json
new file mode 100644
index 000000000..cf5a3dc6b
--- /dev/null
+++ b/website/docs/zh/guide/advanced/_meta.json
@@ -0,0 +1 @@
+["module-federation"]
diff --git a/website/docs/zh/guide/advanced/module-federation.mdx b/website/docs/zh/guide/advanced/module-federation.mdx
new file mode 100644
index 000000000..053a63ffb
--- /dev/null
+++ b/website/docs/zh/guide/advanced/module-federation.mdx
@@ -0,0 +1,158 @@
+# Module Federation
+
+本章节将介绍如何在 Rslib 中构建 Module Federation 产物。
+
+## 名词解释
+
+Module Federation 是一种 JavaScript 应用分治的架构模式(类似于服务端的微服务),它允许你在多个 JavaScript 应用程序(或微前端)之间共享代码和资源。
+
+## 使用场景
+
+模块联邦有一些典型的使用场景,包括:
+
+- 允许独立应用(在微前端架构中称为"微前端")之间共享模块,无需重新编译整个应用。
+- 不同的团队在不需要重新编译整个应用的情况下处理同一应用的不同部分。
+- 应用之间在运行时进行动态代码加载和共享。
+
+模块联邦可以帮助你:
+
+- 减少代码重复
+- 提高代码可维护性
+- 降低应用程序的整体大小
+- 提高应用程序的性能
+
+## 快速接入
+
+首先安装 Module Federation Rsbuild 插件(Rslib 基于 Rsbuild 实现)。
+
+import { PackageManagerTabs } from '@theme';
+
+
+
+将插件添加到 `rslib.config.ts` 中:
+
+```ts title='rslib.config.ts'
+import { pluginModuleFederation } from '@module-federation/rsbuild-plugin';
+import { pluginReact } from '@rsbuild/plugin-react';
+import { defineConfig } from '@rslib/core';
+
+export default defineConfig({
+ lib: [
+ // ... other format
+ {
+ format: 'mf',
+ output: {
+ distPath: {
+ root: './dist/mf',
+ },
+ // add your assetPrefix here
+ assetPrefix: 'http://localhost:3001/mf',
+ },
+ plugins: [
+ pluginModuleFederation({
+ name: 'rslib_provider',
+ exposes: {
+ // add expose here
+ },
+ // can not add 'remote' here, because you may build 'esm' or 'cjs' assets in one build.
+ // if you want the rslib package use remote module, please see below.
+ shared: {
+ react: {
+ singleton: true,
+ },
+ 'react-dom': {
+ singleton: true,
+ },
+ },
+ }),
+ ],
+ },
+ ],
+ plugins: [pluginReact()],
+});
+```
+
+这样我们就完成了 Rslib Module 作为生产者的接入,构建完成后可以看到产物中新增了 mf 目录,消费者可以直接消费这个包。
+
+在上面的例子中,我们设置了一个新的 `format: 'mf'`,这会帮助你生成一份额外的 Module Federation 产物,与此同时,还可以配置 `cjs` 和 `esm` 的 format,它们互相不冲突。
+
+如果你希望这个 Rslib Module 同时可以消费其他生产者,请不要使用构建配置 `remote` 参数,因为在其他 format 中,这可能会导致错误,请参考下方使用 Module Federation 运行时的例子。
+
+## 消费其他 Module Federation 模块
+
+因为 Rslib 中有多种 format,如果在构建时配置 `remote` 参数来消费其他模块可能无法在所有 format 中都能正常工作,推荐通过 [Module Federation Runtime](https://module-federation.io/guide/basic/runtime.html) 进行接入
+
+首先安装运行时依赖
+
+
+
+然后在运行时消费其他 Module Federation 模块,例如
+
+```ts
+import { init, loadRemote } from '@module-federation/enhanced/runtime';
+import { Suspense, createElement, lazy } from 'react';
+
+init({
+ name: 'rslib_provider',
+ remotes: [
+ {
+ name: 'mf_remote',
+ entry: 'http://localhost:3002/mf-manifest.json',
+ },
+ ],
+});
+
+export const Counter: React.FC = () => {
+ return (
+
+ loading
}>
+ {createElement(
+ lazy(
+ () =>
+ loadRemote('mf_remote') as Promise<{
+ default: React.FC;
+ }>,
+ ),
+ )}
+
+
+ );
+};
+```
+
+这样可以保证在多种 format 中都能按预期进行加载模块。
+
+## 常见问题
+
+如果 Rslib 生产者是通过 build 构建的,这意味着生产者的 `process.env.NODE_ENV` 是 `production`。如果这时消费者是 dev 模式启动的,
+由于 Module Federation 的 shared 加载策略默认是 `version-first`,可能会出现加载到不同模式的 react 和 react-dom 的问题(例如 development 模式的 react,production 模式的 react-dom)。
+这时可以在消费者处设置 [shareStrategy](https://module-federation.io/configure/sharestrategy) 来解决这个问题,但请确保您充分了解这个配置
+
+```ts
+pluginModuleFederation({
+ // ...
+ shareStrategy: 'loaded-first',
+}),
+```
+
+## 示例
+
+[Rslib Module Federation Example](https://github.com/web-infra-dev/rslib/tree/main/examples/module-federation)
+
+- `mf-host`: Rsbuild App 消费者
+- `mf-react-component`: Rslib Module,同时是生产者和消费者,作为生产者提供模块给 `mf-host` 使用,作为消费者通过运行时消费 `mf-remote`
+- `mf-remote`: Rsbuild App 生产者