neo-cmp-cli 1.1.18 → 1.1.19
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 +1 -1
- package/src/cmpUtils/createCommonModulesCode.js +0 -1
- package/src/neo/neoRequire.js +16 -1
- package/src/template/antd-custom-cmp-template/package.json +2 -2
- package/src/template/echarts-custom-cmp-template/package.json +2 -2
- package/src/template/neo-custom-cmp-template/package.json +1 -1
- package/src/template/react-custom-cmp-template/package.json +1 -1
- package/src/template/react-ts-custom-cmp-template/package.json +1 -1
- package/src/template/vue2-custom-cmp-template/package.json +1 -1
package/package.json
CHANGED
|
@@ -60,7 +60,6 @@ import { isPlainObject } from 'lodash';
|
|
|
60
60
|
const CustomCmpCommonModules = ${customCmpCommonModulesCode};
|
|
61
61
|
const CustomCmpRemotes = ${JSON.stringify(CustomCmpRemotes)};
|
|
62
62
|
|
|
63
|
-
// 用于添加共享的依赖模块
|
|
64
63
|
// 用于添加共享的依赖模块
|
|
65
64
|
const addNeoCommonModules = (modules) => {
|
|
66
65
|
if (!window.__NeoCommonModules) {
|
package/src/neo/neoRequire.js
CHANGED
|
@@ -38,7 +38,22 @@ const getExternalsByNeoCommonModules = (cmpNeoExternals) => {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
// 用于添加共享的依赖模块
|
|
41
|
-
addNeoCommonModules
|
|
41
|
+
const addNeoCommonModules = (modules) => {
|
|
42
|
+
if (!window.__NeoCommonModules) {
|
|
43
|
+
window.__NeoCommonModules = {}
|
|
44
|
+
}
|
|
45
|
+
if (isPlainObject(modules)) {
|
|
46
|
+
const moduleIds = Object.keys(modules);
|
|
47
|
+
moduleIds.forEach((moduleId) => {
|
|
48
|
+
const curModule = modules[moduleId];
|
|
49
|
+
if (window.__NeoCommonModules[moduleId]) {
|
|
50
|
+
window.__NeoCommonModules[moduleId] = Object.assign(window.__NeoCommonModules[moduleId], curModule);
|
|
51
|
+
} else {
|
|
52
|
+
window.__NeoCommonModules[moduleId] = curModule;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
42
57
|
|
|
43
58
|
// 用于添加自定义组件的远程组件
|
|
44
59
|
const addNeoRemotes = (remotes) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antd-custom-cmp-template",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "neo自定义组件模板(react&ts技术栈)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"自定义组件模板",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@commitlint/config-conventional": "^9.1.1",
|
|
48
48
|
"@types/react": "^16.9.11",
|
|
49
49
|
"@types/react-dom": "^16.9.15",
|
|
50
|
-
"neo-cmp-cli": "^1.1.
|
|
50
|
+
"neo-cmp-cli": "^1.1.19",
|
|
51
51
|
"husky": "^4.2.5",
|
|
52
52
|
"lint-staged": "^10.2.9",
|
|
53
53
|
"prettier": "^2.0.5"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "echarts-custom-cmp-template",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "neo自定义组件模板(react&ts技术栈)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"自定义组件模板",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@commitlint/config-conventional": "^9.1.1",
|
|
48
48
|
"@types/react": "^16.9.11",
|
|
49
49
|
"@types/react-dom": "^16.9.15",
|
|
50
|
-
"neo-cmp-cli": "^1.1.
|
|
50
|
+
"neo-cmp-cli": "^1.1.19",
|
|
51
51
|
"husky": "^4.2.5",
|
|
52
52
|
"lint-staged": "^10.2.9",
|
|
53
53
|
"prettier": "^2.0.5",
|