grgrzybek commented on PR #110:
URL:
https://github.com/apache/activemq-artemis-console/pull/110#issuecomment-3139194396
@GChuf for shared module federation config from `webpack.config.js`:
```javascript
new ModuleFederationPlugin({
shared: {
'react': {
singleton: true,
requiredVersion: dependencies['react'],
},
'react-dom': {
singleton: true,
requiredVersion: dependencies['react-dom'],
},
'react-router-dom': {
singleton: true,
requiredVersion: dependencies['react-router-dom'],
},
'@hawtio/react': {
singleton: true,
requiredVersion: dependencies['@hawtio/react'],
},
'monaco-editor': {
singleton: true,
requiredVersion: dependencies['monaco-editor'],
},
'@patternfly/react-core': {
singleton: true,
requiredVersion: dependencies['@patternfly/react-core'],
},
}
}),
```
the generated code (with `yarn webpack --mode development`) in
`main.bundle.js` should be:
```javascript
switch(name) {
case "default": {
register("@hawtio/react", "1.10.1", () =>
(Promise.all([__webpack_r ...
register("@patternfly/react-core", "5.4.14", () =>
(Promise.all([__ ...
register("monaco-editor", "0.52.2", () =>
(Promise.all([__webpack_r ...
register("react-dom", "18.3.1", () =>
(Promise.all([__webpack_requi ...
register("react-router-dom", "6.30.1", () =>
(Promise.all([__webpac ...
register("react", "18.3.1", () =>
(__webpack_require__.e("vendors-n ...
}
break;
}
```
the production chunk (in my case `runtime.edc42c83.js`) contains:
```javascript
y = {
16828: () => g("default", "react", !1, [ 1, 18, 3, 1 ], () =>
j.e(644).then(() => () => j(63696))),
89144: () => g("default", "react-dom", !1, [ 1, 18, 3, 1 ], () =>
Promise.all([ j.e(644), j.e(695) ]).then(() => () => j(78325))),
1728: () => g("default", "monaco-editor", !1, [ 2, 0, 52, 2 ], () =>
Promise.all([ j.e(502), j.e(859) ]).then(() => () => j(11918))),
40266: () => g("default", "@patternfly/react-core", !1, [ 1, 5, 4, 14 ],
() => Promise.all([ j.e(176), j.e(612), j.e(806), j.e(695) ]).then(() => () =>
j(73196))),
66418: () => g("default", "react-router-dom", !1, [ 1, 6, 30, 1 ], () =>
Promise.all([ j.e(644), j.e(695) ]).then(() => () => j(49348))),
4201: () => g("default", "@hawtio/react", !1, [ 1, 1, 10, 1 ], () =>
Promise.all([ j.e(176), j.e(612), j.e(806), j.e(631), j.e(695), j.e(680)
]).then(() => () => j(20596)))
},
```
where `[ 1, 5, 4, 14 ]` matches `"5.4.14"`.
What you see (`Unsatisfied version 6.2.0`) definitely comes from latest
`@patternfly/react-core` version which we don't use...
Let me check with `jetty:run`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact