@angular-architects/native-federation 19.0.19 → 19.0.20
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 +0 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -391,28 +391,6 @@ For this, there are several reasons:
|
|
|
391
391
|
|
|
392
392
|
The good message is, that the official Angular Package Format defines the usage of ECMA Script Modules (ESM) for years. This is the future-proof standard, Native Federation is built upon and all npm packages created with the Angular CLI follow. If you use older CommonJS-based packages, Native Federation automatically converts them to ESM. Depending on the package, this might change some details. Here, you find some [information for dealing with CommonJS packages](https://shorturl.at/jmzH0).
|
|
393
393
|
|
|
394
|
-
### How to Deal with Transitive Dependencies?
|
|
395
|
-
|
|
396
|
-
Since version >=18.2.7, transitive dependencies can also be shared. For instance, `primeng` uses a lib `@primeuix/styled` for theming. The latter one is now shared too if `primeng` is. This prevents possible challenges but also results in more bundles.
|
|
397
|
-
|
|
398
|
-
To activate sharing transient dependencies, set the new `transient` flag provided by `share` and `shareAll` to `true`:
|
|
399
|
-
|
|
400
|
-
```js
|
|
401
|
-
module.exports = withNativeFederation({
|
|
402
|
-
shared: {
|
|
403
|
-
...shareAll({
|
|
404
|
-
singleton: true,
|
|
405
|
-
strictVersion: true,
|
|
406
|
-
requiredVersion: 'auto',
|
|
407
|
-
transient: true
|
|
408
|
-
}),
|
|
409
|
-
},
|
|
410
|
-
[...]
|
|
411
|
-
});
|
|
412
|
-
```
|
|
413
|
-
|
|
414
|
-
The `skip` list will also be used for filtering transient dependencies. Hence, you can combine it with `shareAll` and `transient: true`.
|
|
415
|
-
|
|
416
394
|
### How to Manually Define a Package's Entry Point?
|
|
417
395
|
|
|
418
396
|
Usually, Native Federation automatically detects entry points in shared packages. If the packages neither align with the official standard nor with typical conventions beyond these standards, you can also directly provide the entry point:
|