Skip to content

Commit b1743a8

Browse files
committed
Merge branch 'main' into chore/export-react-api
2 parents 6af0036 + fd303b2 commit b1743a8

File tree

190 files changed

+4759
-1711
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+4759
-1711
lines changed

.changeset/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
"@module-federation/inject-external-runtime-core-plugin",
2828
"@module-federation/runtime-core",
2929
"create-module-federation",
30-
"@module-federation/cli"
30+
"@module-federation/cli",
31+
"@module-federation/rspress-plugin"
3132
]
3233
],
3334
"ignorePatterns": ["^alpha|^beta"],

.changeset/weak-spoons-begin.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,7 @@ vitest.config.*.timestamp*
8383
.cursor/rules/nx-rules.mdc
8484
.github/instructions/nx.instructions.md
8585
.temp-commit-msg
86+
87+
# website-new
88+
.rsbuild
89+
ssg

apps/modernjs/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @module-federation/modernjsapp
22

3+
## 0.1.100
4+
5+
### Patch Changes
6+
7+
- @module-federation/enhanced@0.16.0
8+
39
## 0.1.99
410

511
### Patch Changes

apps/modernjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@module-federation/modernjsapp",
33
"private": true,
4-
"version": "0.1.99",
4+
"version": "0.1.100",
55
"scripts": {
66
"reset": "npx rimraf ./**/node_modules",
77
"dev": "modern dev",

apps/node-host/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = composePlugins(withNx(), async (config) => {
99
config.devtool = false;
1010
config.target = 'async-node';
1111
config.output.publicPath = '/testing';
12-
config.output.chunkFilename = '[id]-[chunkhash].js';
12+
config.output.chunkFilename = '[id]-[contenthash].js';
1313
config.optimization.chunkIds = 'named';
1414
await new Promise((r) => setTimeout(r, 400));
1515
config.module.rules.pop();

apps/router-demo/router-remote5-2005/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# remote5
22

3+
## 1.1.7
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [98136ca]
8+
- @module-federation/rsbuild-plugin@0.16.0
9+
- @module-federation/bridge-react@0.16.0
10+
311
## 1.1.6
412

513
### Patch Changes

apps/router-demo/router-remote5-2005/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "remote5",
33
"private": true,
4-
"version": "1.1.6",
4+
"version": "1.1.7",
55
"scripts": {
66
"dev": "rsbuild dev",
77
"build": "rsbuild build",

apps/website-new/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# website-new
22

3+
## 1.1.7
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [790302a]
8+
- @module-federation/rspress-plugin@0.16.0
9+
- @module-federation/error-codes@0.16.0
10+
311
## 1.1.6
412

513
### Patch Changes

apps/website-new/docs/en/configure/shared.mdx

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -111,34 +111,22 @@ At this point, you can add the corresponding dependencies to the `shared` config
111111

112112
### How to use shared dependencies
113113

114-
Depending on the use case, `Module Federation` supports two forms of shared dependency configuration: array and object. The former is suitable for most scenarios, while the latter is suitable for complex customization needs.
114+
Depending on the use case, {props.name || 'Module Federation'} supports two forms of shared dependency configuration: array and object. The former is suitable for most scenarios, while the latter is suitable for complex customization needs.
115115

116116
**Array Format (General Scenario)**
117117

118-
Simply add the corresponding dependencies to the `shared` configuration in the `Module Federation` build configuration, for example:
118+
Simply add the corresponding dependencies to the `shared` configuration in the {props.name || 'Module Federation'} build configuration, for example:
119119

120-
```ts
121-
new ModuleFederationPlugin({
122-
name: '@demo/button',
123-
shared: ['react', 'react-dom'],
124-
//...
125-
});
126-
```
120+
import ArrayShared from '@components/common/configure/array-shared';
121+
import React from 'react';
122+
123+
{props.arrayShared || React.createElement(ArrayShared)}
127124

128125
**Object Format (Customized Configuration)**
129126

130-
Add the shared dependencies in the `shared` configuration of the `Module Federation Plugin`, with the `key` being the dependency name and the `value` being the provided configuration.
127+
Add the shared dependencies in the `shared` configuration of the {props.name || 'Module Federation'}, with the `key` being the dependency name and the `value` being the provided configuration.
128+
129+
import ObjectShared from '@components/common/configure/object-shared'
130+
131+
{props.objectShared || React.createElement(ObjectShared)}
131132

132-
```ts
133-
new ModuleFederationPlugin({
134-
name: '@demo/button',
135-
shared: {
136-
react: {
137-
singleton: true,
138-
requiredVersion: '~18.2.0',
139-
fixedDependencies: true,
140-
},
141-
},
142-
//...
143-
});
144-
```

0 commit comments

Comments
 (0)