Skip to content

Commit 4d85ac3

Browse files
committed
chore: updateo to version 19
1 parent 2b5c689 commit 4d85ac3

File tree

9 files changed

+49
-18
lines changed

9 files changed

+49
-18
lines changed

libs/mf-runtime/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@angular-architects/module-federation-runtime",
33
"license": "MIT",
4-
"version": "19.0.0-beta.0",
4+
"version": "19.0.1",
55
"peerDependencies": {
66
"@angular/common": ">=18.0.0",
77
"@angular/core": ">=18.0.0",

libs/mf-tools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular-architects/module-federation-tools",
3-
"version": "19.0.0-beta.0",
3+
"version": "19.0.1",
44
"license": "MIT",
55
"peerDependencies": {},
66
"dependencies": {

libs/mf/README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,30 @@ Seamlessly using Webpack Module Federation with the Angular CLI.
44

55
## Thanks
66

7-
Big thanks to the following people who helped to make this possible:
7+
We are standing on the shoulders of giants. Big thanks to the following people who helped to make this project possible:
88

9+
- [Colum Ferry](https://x.com/ferrycolum), Nx Team Member
10+
- [Zack Jackson](https://x.com/ScriptedAlchemy), Inventor of Module Federation
911
- [Tobias Koppers](https://twitter.com/wSokra), Founder of Webpack
1012
- [Dmitriy Shekhovtsov](https://twitter.com/valorkin), Angular GDE
1113
- [Michael Egger-Zikes](https://twitter.com/MikeZks), Angular Architects
1214

1315
## Prequisites
1416

15-
- Angular CLI 12 or higher (13, 14, 15, 16)
17+
- Angular CLI 12 or higher
1618

1719
## Motivation 💥
1820

1921
Module Federation allows loading separately compiled and deployed code (like micro frontends or plugins) into an application. This plugin makes Module Federation work together with Angular and the CLI.
2022

23+
## Supporting Several Technologies
24+
25+
✅ Supports webpack, rsbuild (experimental, nextgen), esbuild
26+
27+
✅ Supports Module Federation and Native Federation
28+
29+
✅ Supports the Angular CLI and Nx
30+
2131
## Features 🔥
2232

2333
✅ Generates the skeleton for a Module Federation config.
@@ -36,14 +46,27 @@ Since Version 1.2, we also provide some advanced features like:
3646

3747
## Which Version to use?
3848

49+
We are going to provide at least one major per Angular major to keep track with the Angular ecosystem and its innovations:
50+
3951
- Angular 12: @angular-architects/module-federation: ^12.0.0
4052
- Angular 13: @angular-architects/module-federation: ~14.2.0
4153
- Angular 14: @angular-architects/module-federation: ^14.3.0
4254
- Angular 15: @angular-architects/module-federation: ^15.0.0
4355
- Angular 16: @angular-architects/module-federation: ^16.0.0
56+
- Angular 17: @angular-architects/module-federation: ^17.0.0
57+
- Angular 18: @angular-architects/module-federation: ^18.0.0
58+
- Angular 19: @angular-architects/module-federation: ^19.0.0
4459

4560
Beginning with Angular 13, we had to add some changes to adjust to the Angular CLI. Please see the next section for this.
4661

62+
## webpack, rsbuild, and esbuild
63+
64+
Since version 19, the plugin's ng-add schematic asks whether you want to use the traditional Webpack-based builder, the (currently experimental, fast, next-generation) rsbuild builder, or esbuild (fast, Angular CLI's new default).
65+
66+
The first two are supported via Module Federation. For the rsbuild integration, we are using Colum Ferry's awesome community project, @ng-rsbuild/plugin-angular. So, all credit for making rsbuild work with Angular goes to Colum.
67+
68+
The esbuild integration is technically a wrapper around the Angular CLI's new default builder, the ApplicationBuilder. It is powered by Native Federation, our bundler-agnostic implementation based on web standards like ECMAScript modules and Import Maps.
69+
4770
## Update
4871

4972
This library supports `ng update`:

libs/mf/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular-architects/module-federation",
3-
"version": "19.0.0-beta.0",
3+
"version": "19.0.1",
44
"license": "MIT",
55
"repository": {
66
"type": "GitHub",
@@ -17,7 +17,7 @@
1717
"schematics": "./collection.json",
1818
"builders": "./builders.json",
1919
"dependencies": {
20-
"@angular-architects/module-federation-runtime": "19.0.0-beta.0",
20+
"@angular-architects/module-federation-runtime": "19.0.1",
2121
"word-wrap": "^1.2.3",
2222
"callsite": "^1.0.0",
2323
"node-fetch": "^2.6.7",

libs/mf/src/schematics/init-rspack/schematic.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ function updateProjectConfig(projectConfig: ProjectConfig, port: number) {
351351
const target = projectConfig.architect['original-serve'];
352352
target.options = {
353353
...target.options,
354-
port: port || 4200
354+
port: port || 4200,
355355
};
356356
}
357357
}
@@ -394,12 +394,13 @@ function generateRemoteMap(workspace: WorkspaceConfig, projectName: string) {
394394
if (
395395
p !== projectName &&
396396
projectType === 'application' &&
397-
(project?.architect?.serve || project?.architect?.['original-serve']) &&
397+
(project?.architect?.serve || project?.architect?.['original-serve']) &&
398398
(project?.architect?.build || project?.architect?.['original-build'])
399399
) {
400-
const pPort = project.architect.serve?.options?.port
401-
?? project.architect['original-serve']?.options?.port
402-
?? 4200;
400+
const pPort =
401+
project.architect.serve?.options?.port ??
402+
project.architect['original-serve']?.options?.port ??
403+
4200;
403404
result[strings.camelize(p)] = `http://localhost:${pPort}/remoteEntry.js`;
404405
}
405406
}

libs/mf/src/schematics/init-webpack/schematic.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ export default function config(options: MfSchematicSchema): Rule {
236236

237237
if (isApplicationBuilder) {
238238
console.warn(
239-
`\nWARNING: This package uses the tradtional webpack-based Module Federation implementation and not the fast new esbuild-based ApplicationBuilder.`
239+
`\nWARNING: This package uses the traditional webpack-based Module Federation implementation and not the fast new esbuild-based ApplicationBuilder.`
240240
);
241241
console.warn(
242242
`\nFor new projects, consider Native Federation as an alternative: https://shorturl.at/0ZQ0j`
@@ -403,11 +403,11 @@ export default function config(options: MfSchematicSchema): Rule {
403403

404404
const dep = getPackageJsonDependency(tree, 'ngx-build-plus');
405405

406-
if (!dep || !semver.satisfies(dep.version, '>=18.0.0')) {
406+
if (!dep || !semver.satisfies(dep.version, '>=19.0.0')) {
407407
addPackageJsonDependency(tree, {
408408
name: 'ngx-build-plus',
409409
type: NodeDependencyType.Dev,
410-
version: '^18.0.0',
410+
version: '^19.0.0',
411411
overwrite: true,
412412
});
413413

libs/mf/src/schematics/init/schema.d.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@ export interface InitSchema {
33
port: string | number;
44
nxBuilders: boolean | undefined;
55
type: 'host' | 'dynamic-host' | 'remote' | 'legacy';
6-
stack: 'module-federation-webpack' | 'module-federation-rsbuild' | 'native-federation-esbuild';
6+
stack:
7+
| 'module-federation-webpack'
8+
| 'module-federation-rsbuild-experimental'
9+
| 'native-federation-esbuild';
710
}

libs/mf/src/schematics/init/schema.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@
3333
},
3434
"stack": {
3535
"type": "string",
36-
"enum": ["module-federation-webpack", "module-federation-rsbuild", "native-federation-esbuild"],
36+
"enum": [
37+
"module-federation-webpack",
38+
"module-federation-rsbuild-experimental",
39+
"native-federation-esbuild"
40+
],
3741
"x-aliases": ["s"],
3842
"x-prompt": {
3943
"message": "Which stack do you want to use?",
@@ -44,7 +48,7 @@
4448
"label": "Module Federation with webpack (classic)"
4549
},
4650
{
47-
"value": "module-federation-rsbuild",
51+
"value": "module-federation-rsbuild-experimental",
4852
"label": "Module Federation with rsbuild (experimental nextgen)"
4953
},
5054
{

libs/mf/src/schematics/init/schematic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function init(options: InitSchema): Rule {
1919
case 'module-federation-webpack':
2020
return chain([schematic('init-webpack', delegationOptions)]);
2121

22-
case 'module-federation-rsbuild':
22+
case 'module-federation-rsbuild-experimental':
2323
return chain([schematic('init-rspack', delegationOptions)]);
2424

2525
case 'native-federation-esbuild':

0 commit comments

Comments
 (0)