@angular-architects/native-federation 21.0.0 → 21.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,6 +36,7 @@ We will at least provide a new version of this package per Angular major. If nec
|
|
|
36
36
|
- Use version 19.x for Angular 19.x
|
|
37
37
|
- Use version 20.0.x for Angular 20.0.x
|
|
38
38
|
- Use version 20.1.x for Angular 20.1.x
|
|
39
|
+
- Use version 21.x for Angular 21.x
|
|
39
40
|
|
|
40
41
|
## Demo Repo
|
|
41
42
|
|
|
@@ -172,7 +173,10 @@ A dynamic host reads the configuration data at runtime from a `.json` file.
|
|
|
172
173
|
The host configuration (`projects/shell/federation.config.js`) looks like what you know from our Module Federation plugin:
|
|
173
174
|
|
|
174
175
|
```javascript
|
|
175
|
-
const {
|
|
176
|
+
const {
|
|
177
|
+
withNativeFederation,
|
|
178
|
+
shareAll,
|
|
179
|
+
} = require('@angular-architects/native-federation/config');
|
|
176
180
|
|
|
177
181
|
module.exports = withNativeFederation({
|
|
178
182
|
name: 'my-host',
|
|
@@ -201,7 +205,10 @@ module.exports = withNativeFederation({
|
|
|
201
205
|
Also, the remote configuration (`projects/mfe1/federation.config.js`) looks familiar:
|
|
202
206
|
|
|
203
207
|
```javascript
|
|
204
|
-
const {
|
|
208
|
+
const {
|
|
209
|
+
withNativeFederation,
|
|
210
|
+
shareAll,
|
|
211
|
+
} = require('@angular-architects/native-federation/config');
|
|
205
212
|
|
|
206
213
|
module.exports = withNativeFederation({
|
|
207
214
|
name: 'mfe1',
|
|
@@ -300,7 +307,8 @@ export const APP_ROUTES: Routes = [
|
|
|
300
307
|
// Add this route:
|
|
301
308
|
{
|
|
302
309
|
path: 'flights',
|
|
303
|
-
loadComponent: () =>
|
|
310
|
+
loadComponent: () =>
|
|
311
|
+
loadRemoteModule('mfe1', './Component').then((m) => m.AppComponent),
|
|
304
312
|
},
|
|
305
313
|
|
|
306
314
|
{
|