@alauda-fe/devkit 1.0.7-beta.0 → 1.0.7
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/package.json
CHANGED
package/src/mfe-config-utils.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
const { execSync } = require('child_process');
|
|
2
|
-
|
|
3
1
|
const isCoreModules = packageName => {
|
|
4
2
|
const coreModules = ['rxjs', 'zone.js', 'tslib', 'ng-monaco-editor'];
|
|
5
3
|
|
|
@@ -29,10 +27,6 @@ const isStandaloneModules = packageName => {
|
|
|
29
27
|
};
|
|
30
28
|
|
|
31
29
|
module.exports = {
|
|
32
|
-
generateName: name => {
|
|
33
|
-
const commitID = execSync('git rev-parse --short HEAD').toString().trim();
|
|
34
|
-
return `${name}__${commitID}`;
|
|
35
|
-
},
|
|
36
30
|
shared: (packageName, config) => {
|
|
37
31
|
if (
|
|
38
32
|
packageName &&
|
|
@@ -1,15 +1,24 @@
|
|
|
1
|
+
const { execSync } = require('child_process');
|
|
2
|
+
|
|
1
3
|
const { withModuleFederation } = require('@nx/angular/module-federation');
|
|
2
4
|
const { merge } = require('webpack-merge');
|
|
3
5
|
|
|
6
|
+
const generateName = name => {
|
|
7
|
+
const commitID = execSync('git rev-parse --short HEAD').toString().trim();
|
|
8
|
+
return `${name}__${commitID}`;
|
|
9
|
+
};
|
|
10
|
+
|
|
4
11
|
module.exports = async (mfeConfig, overrideConfig = {}) => {
|
|
5
12
|
const mfe = await withModuleFederation(mfeConfig, overrideConfig);
|
|
6
13
|
|
|
7
|
-
return config =>
|
|
8
|
-
merge(mfe(config), {
|
|
14
|
+
return config => {
|
|
15
|
+
return merge(mfe(config), {
|
|
16
|
+
output: { uniqueName: generateName(mfeConfig.name) },
|
|
9
17
|
devServer: {
|
|
10
18
|
headers: {
|
|
11
19
|
'Access-Control-Allow-Origin': '*',
|
|
12
20
|
},
|
|
13
21
|
},
|
|
14
22
|
});
|
|
23
|
+
};
|
|
15
24
|
};
|