@angular-architects/native-federation 0.9.0 → 0.9.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 +16 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ This is a first experimental version. The results look very promising, however i
|
|
|
30
30
|
|
|
31
31
|
Limitations:
|
|
32
32
|
|
|
33
|
-
- 🔷 As we use a fork of the experimental esbuild builder the CLI team is current working on, there is currently **only a builder for ng build**. ng serve or ng test are currently not supported. This support will be added with a future version.
|
|
33
|
+
- 🔷 As we use a fork of the experimental esbuild builder the CLI team is current working on, there is currently **only a builder for ng build**. ng serve or ng test are currently not supported. This support will be added with a future version. Also, as the forked esbuile builder is still experimental, you cannot expect to get all the features you are used to. This will also change over time.
|
|
34
34
|
|
|
35
35
|
- 🔷 Libraries are currently only shared if two or more remotes (Micro Frontends) request the very same version. This is also what works best with Angular. In a future version, we will add optional "version negotiation" for the sake of feature parity with Module Federation. This allows Native Federation to decide for a "higher compatible version" (e. g. a higher minor version provided by another Micro Frontend) at runtime.
|
|
36
36
|
|
|
@@ -59,7 +59,7 @@ cd module-federation-plugin-example
|
|
|
59
59
|
|
|
60
60
|
npm i
|
|
61
61
|
npm run build
|
|
62
|
-
npm
|
|
62
|
+
npm start
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
Then, open http://localhost:3000 in your browser.
|
|
@@ -248,6 +248,20 @@ export const APP_ROUTES: Routes = [
|
|
|
248
248
|
|
|
249
249
|
However, we prefer the first option where just the ``remoteName`` is passed.
|
|
250
250
|
|
|
251
|
+
|
|
252
|
+
## FAQ
|
|
253
|
+
|
|
254
|
+
### Should we Already use Native Federation in Production?
|
|
255
|
+
|
|
256
|
+
For production, we would stick with Module Federation for the time being. Native Federation, however, shows that you don't need to fear that you are left alone, once you (or the community) wants to move over to other build tools.
|
|
257
|
+
|
|
258
|
+
We will evolve Native Federation but also our Module Federation support and keep you posted.
|
|
259
|
+
|
|
260
|
+
### How does Native Federation Work under the Covers?
|
|
261
|
+
|
|
262
|
+
We use Import Maps at runtime. As they are currently not supported in every browser, our ``init`` schematic installs the ``es-module-shims`` polyfill. In addition to Import Maps, we use some code at build time and at runtime to provide the Mental Model of Module Federation.
|
|
263
|
+
|
|
264
|
+
|
|
251
265
|
## More: Blog Articles
|
|
252
266
|
|
|
253
267
|
Find out more about our work including Micro Frontends and Module Federation but also about alternatives to these approaches in our [blog](https://www.angulararchitects.io/en/aktuelles/the-microfrontend-revolution-part-2-module-federation-with-angular/).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-architects/native-federation",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"main": "src/index.js",
|
|
5
5
|
"generators": "./collection.json",
|
|
6
6
|
"builders": "./builders.json",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"@angular-architects/module-federation": "^14.0.0",
|
|
20
20
|
"@angular-architects/module-federation-runtime": "^14.3.10",
|
|
21
21
|
"semver": "^7.3.5",
|
|
22
|
-
"rxjs": "
|
|
23
|
-
"@angular-architects/native-federation-runtime": "0.9.
|
|
22
|
+
"rxjs": ">=6.6.3",
|
|
23
|
+
"@angular-architects/native-federation-runtime": "0.9.1"
|
|
24
24
|
},
|
|
25
25
|
"typings": "./src/index.d.ts",
|
|
26
26
|
"dependencies": {}
|