@redhat-cloud-services/frontend-components-config-utilities 1.5.11 → 1.5.14
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/federated-modules.js +7 -7
- package/package.json +1 -1
- package/serve-federated.js +2 -2
package/federated-modules.js
CHANGED
|
@@ -4,20 +4,20 @@ const { ModuleFederationPlugin } = require('webpack').container;
|
|
|
4
4
|
const jsVarName = require('./jsVarName');
|
|
5
5
|
|
|
6
6
|
const include = {
|
|
7
|
-
'@patternfly/react-core': {},
|
|
8
|
-
'@patternfly/react-table': {},
|
|
7
|
+
'@patternfly/react-core': { eager: true },
|
|
8
|
+
'@patternfly/react-table': { eager: true },
|
|
9
9
|
'@patternfly/react-tokens': {},
|
|
10
10
|
'@patternfly/react-icons': {},
|
|
11
|
-
'@patternfly/quickstarts': { singleton: true },
|
|
11
|
+
'@patternfly/quickstarts': { singleton: true, eager: true },
|
|
12
12
|
'@redhat-cloud-services/frontend-components': {},
|
|
13
13
|
'@redhat-cloud-services/frontend-components-utilities': {},
|
|
14
14
|
'@redhat-cloud-services/frontend-components-notifications': {},
|
|
15
15
|
axios: {},
|
|
16
16
|
lodash: {},
|
|
17
17
|
'redux-promise-middleware': {},
|
|
18
|
-
react: { singleton: true },
|
|
19
|
-
'react-dom': { singleton: true },
|
|
20
|
-
'react-router-dom': {},
|
|
18
|
+
react: { singleton: true, eager: true },
|
|
19
|
+
'react-dom': { singleton: true, eager: true },
|
|
20
|
+
'react-router-dom': { eager: true },
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
module.exports = ({ root, exposes, shared = [], debug, moduleName, useFileHash = true, libType = 'var', libName, exclude = [] }) => {
|
|
@@ -39,7 +39,7 @@ module.exports = ({ root, exposes, shared = [], debug, moduleName, useFileHash =
|
|
|
39
39
|
* No application should be installing/interacting with scalprum directly.
|
|
40
40
|
*/
|
|
41
41
|
if (dependencies['@redhat-cloud-services/frontend-components']) {
|
|
42
|
-
sharedDeps.push({ '@scalprum/react-core': { requiredVersion: '*', singleton: true } });
|
|
42
|
+
sharedDeps.push({ '@scalprum/react-core': { requiredVersion: '*', singleton: true, eager: true } });
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
/**
|
package/package.json
CHANGED
package/serve-federated.js
CHANGED
|
@@ -2,7 +2,7 @@ const path = require('path');
|
|
|
2
2
|
const fs = require('fs');
|
|
3
3
|
const concurrently = require('concurrently');
|
|
4
4
|
|
|
5
|
-
function federate(argv, cwd) {
|
|
5
|
+
async function federate(argv, cwd) {
|
|
6
6
|
let configPath = argv.config;
|
|
7
7
|
const WEBPACK_PATH = path.resolve(cwd, './node_modules/.bin/webpack');
|
|
8
8
|
const HTTP_SERVER_PATH = path.resolve(cwd, './node_modules/.bin/http-server');
|
|
@@ -17,7 +17,7 @@ function federate(argv, cwd) {
|
|
|
17
17
|
fs.statSync(configPath);
|
|
18
18
|
let config = require(configPath);
|
|
19
19
|
if (typeof config === 'function') {
|
|
20
|
-
config = config(process.env);
|
|
20
|
+
config = await Promise.resolve(config(process.env));
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const outputPath = config.output.path;
|