chayns-api 3.0.0-beta.3 → 3.0.0
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
CHANGED
|
@@ -39,23 +39,16 @@ const FirstName = () => {
|
|
|
39
39
|
}
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
##
|
|
43
|
-
|
|
44
|
-
When updating to chayns-api@2 you should also update chayns-toolkit to 3.0.1 or higher (check migration guide [here](https://github.com/TobitSoftware/chayns-toolkit/tree/main?tab=readme-ov-file#-migration-v2-to-v3)).
|
|
45
|
-
|
|
46
|
-
Check urls referencing **remoteEntry.js**. The filename has been changed to **v2.remoteEntry.js**.
|
|
47
|
-
|
|
48
|
-
When your application uses ChaynsHost with module-type you might have to add a call of **initModuleFederationSharing** as early as possible in your application (e.g. index/bootstrap). Unless your application is already embedded as module somewhere else (e.g. in a dialog).
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
initModuleFederationSharing({ name: 'project_name' });
|
|
52
|
-
```
|
|
42
|
+
## Migration
|
|
53
43
|
|
|
44
|
+
For migration guides between major versions, please refer to the [migration documentation](https://tobitsoftware.github.io/chayns-api/docs/migration).
|
|
54
45
|
|
|
55
46
|
## Getting started
|
|
56
47
|
|
|
57
48
|
More information to setup chayns-api can be found in the [documentation](https://tobitsoftware.github.io/chayns-api/docs).
|
|
58
49
|
|
|
50
|
+
For advanced use cases like Module Federation, refer to the [Module Federation Guide](https://tobitsoftware.github.io/chayns-api/docs/module-federation).
|
|
51
|
+
|
|
59
52
|
## Troubleshooting
|
|
60
53
|
|
|
61
54
|
```
|
|
@@ -39,7 +39,10 @@ const initModuleFederationSharing = ({
|
|
|
39
39
|
'react-dom/server': {
|
|
40
40
|
version: _react.default.version,
|
|
41
41
|
scope: 'chayns-api',
|
|
42
|
-
|
|
42
|
+
get: async () => {
|
|
43
|
+
const module = await Promise.resolve().then(() => _interopRequireWildcard(require('react-dom/server')));
|
|
44
|
+
return () => module;
|
|
45
|
+
}
|
|
43
46
|
}
|
|
44
47
|
};
|
|
45
48
|
if (ReactDOMClient) {
|
|
@@ -31,7 +31,10 @@ export const initModuleFederationSharing = ({
|
|
|
31
31
|
'react-dom/server': {
|
|
32
32
|
version: React.version,
|
|
33
33
|
scope: 'chayns-api',
|
|
34
|
-
|
|
34
|
+
get: async () => {
|
|
35
|
+
const module = await import('react-dom/server');
|
|
36
|
+
return () => module;
|
|
37
|
+
}
|
|
35
38
|
}
|
|
36
39
|
};
|
|
37
40
|
if (ReactDOMClient) {
|