neo-cmp-cli 1.2.1 → 1.2.3

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo-cmp-cli",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "前端脚手架:自定义组件开发工具,支持react 和 vue2.0技术栈。",
5
5
  "keywords": [
6
6
  "neo-cli",
@@ -66,16 +66,25 @@ const addNeoCommonModules = (modules) => {
66
66
  window.__NeoCommonModules = {}
67
67
  }
68
68
  if (isPlainObject(modules)) {
69
- const moduleIds = Object.keys(modules);
69
+ const moduleIds = Object.keys(modules)
70
70
  moduleIds.forEach((moduleId) => {
71
71
  const curModule = modules[moduleId];
72
72
  const curCommonModule = window.__NeoCommonModules[moduleId];
73
- if (curCommonModule && Object.keys(curCommonModule).length < 2) {
74
- window.__NeoCommonModules[moduleId] = Object.assign(window.__NeoCommonModules[moduleId], curModule)
73
+
74
+ if (curCommonModule && Object.keys(curCommonModule).length < 3) {
75
+ window.__NeoCommonModules[moduleId] = Object.assign(window.__NeoCommonModules[moduleId], curModule);
76
+
77
+ // 处理模块中的特殊属性
78
+ if (curModule.__esModule !== undefined) {
79
+ window.__NeoCommonModules[moduleId].__esModule = curModule.__esModule;
80
+ }
81
+ if (curModule.default !== undefined) {
82
+ window.__NeoCommonModules[moduleId].default = curModule.default;
83
+ }
75
84
  } else {
76
85
  window.__NeoCommonModules[moduleId] = curModule
77
86
  }
78
- });
87
+ })
79
88
  }
80
89
  }
81
90
 
@@ -13,7 +13,7 @@ const getEntriesWithAutoRegister = require('../cmpUtils/getEntriesWithAutoRegist
13
13
  const previewCmp = require('./previewCmp');
14
14
  const AddNeoRequirePlugin = require('../plugins/AddNeoRequirePlugin');
15
15
  const { getExternalsByNeoCommonModules } = require('../neo/neoRequire');
16
- // const { MFPlugins } = require('../utils/webpack.mf');
16
+ // const { MFPlugins } = require('../neo/webpack.mf');
17
17
  const createCommonModulesCode = require('../cmpUtils/createCommonModulesCode');
18
18
 
19
19
  const getValue = (originValue, defaultValue) => {
@@ -47,8 +47,17 @@ const addNeoCommonModules = (modules) => {
47
47
  moduleIds.forEach((moduleId) => {
48
48
  const curModule = modules[moduleId];
49
49
  const curCommonModule = window.__NeoCommonModules[moduleId];
50
- if (curCommonModule && Object.keys(curCommonModule).length < 2) {
51
- window.__NeoCommonModules[moduleId] = Object.assign(window.__NeoCommonModules[moduleId], curModule)
50
+
51
+ if (curCommonModule && Object.keys(curCommonModule).length < 3) {
52
+ window.__NeoCommonModules[moduleId] = Object.assign(window.__NeoCommonModules[moduleId], curModule);
53
+
54
+ // 处理模块中的特殊属性
55
+ if (curModule.__esModule !== undefined) {
56
+ window.__NeoCommonModules[moduleId].__esModule = curModule.__esModule;
57
+ }
58
+ if (curModule.default !== undefined) {
59
+ window.__NeoCommonModules[moduleId].default = curModule.default;
60
+ }
52
61
  } else {
53
62
  window.__NeoCommonModules[moduleId] = curModule
54
63
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antd-custom-cmp-template",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
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.2.1",
50
+ "neo-cmp-cli": "^1.2.2",
51
51
  "husky": "^4.2.5",
52
52
  "lint-staged": "^10.2.9",
53
53
  "prettier": "^2.0.5"
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import './style.scss'; // 组件内容样式
3
3
  // @ts-ignore
4
- import ChartWidget from 'chart-widget'; // 另一个自定义组件导出的模块
4
+ // import ChartWidget from 'chart-widget'; // 另一个自定义组件导出的模块
5
5
 
6
6
  interface InfoCardProps {
7
7
  title: string;
@@ -65,7 +65,7 @@ export default class InfoCard extends React.PureComponent<InfoCardProps> {
65
65
  </div>
66
66
  )}
67
67
  </div>
68
- <ChartWidget
68
+ {/* <ChartWidget
69
69
  chartType="line"
70
70
  title="销售趋势"
71
71
  subtitle="2025年数据"
@@ -80,7 +80,7 @@ export default class InfoCard extends React.PureComponent<InfoCardProps> {
80
80
  },
81
81
  ],
82
82
  }}
83
- />
83
+ /> */}
84
84
  </div>
85
85
  );
86
86
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "echarts-custom-cmp-template",
3
- "version": "1.1.6",
3
+ "version": "1.1.19",
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.2.1",
50
+ "neo-cmp-cli": "^1.2.2",
51
51
  "husky": "^4.2.5",
52
52
  "lint-staged": "^10.2.9",
53
53
  "prettier": "^2.0.5",
@@ -48,7 +48,7 @@
48
48
  "@types/react": "^16.9.11",
49
49
  "@types/react-dom": "^16.9.15",
50
50
  "@types/axios": "^0.14.0",
51
- "neo-cmp-cli": "^1.2.1",
51
+ "neo-cmp-cli": "^1.2.2",
52
52
  "husky": "^4.2.5",
53
53
  "lint-staged": "^10.2.9",
54
54
  "prettier": "^2.0.5"
@@ -44,7 +44,7 @@
44
44
  "devDependencies": {
45
45
  "@commitlint/cli": "^8.3.5",
46
46
  "@commitlint/config-conventional": "^9.1.1",
47
- "neo-cmp-cli": "^1.2.1",
47
+ "neo-cmp-cli": "^1.2.2",
48
48
  "husky": "^4.2.5",
49
49
  "lint-staged": "^10.2.9",
50
50
  "prettier": "^2.0.5"
@@ -46,7 +46,7 @@
46
46
  "@commitlint/config-conventional": "^9.1.1",
47
47
  "@types/react": "^16.9.11",
48
48
  "@types/react-dom": "^16.9.15",
49
- "neo-cmp-cli": "^1.2.1",
49
+ "neo-cmp-cli": "^1.2.2",
50
50
  "husky": "^4.2.5",
51
51
  "lint-staged": "^10.2.9",
52
52
  "prettier": "^2.0.5"
@@ -44,7 +44,7 @@
44
44
  "devDependencies": {
45
45
  "@commitlint/cli": "^8.3.5",
46
46
  "@commitlint/config-conventional": "^9.1.1",
47
- "neo-cmp-cli": "^1.2.1",
47
+ "neo-cmp-cli": "^1.2.2",
48
48
  "husky": "^4.2.5",
49
49
  "lint-staged": "^10.2.9",
50
50
  "prettier": "^2.0.5",
File without changes