neo-cmp-cli 1.0.16 → 1.0.17

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.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "前端脚手架:自定义组件开发工具,支持react 和 vue2.0技术栈。",
5
5
  "keywords": [
6
6
  "neo-cli",
@@ -162,6 +162,7 @@ yargs
162
162
  }
163
163
  }
164
164
  )
165
+ /*
165
166
  .command(
166
167
  'preview',
167
168
  '开启组件预览模式(仅预览组件本身内容)',
@@ -175,6 +176,7 @@ yargs
175
176
  mainAction.preview();
176
177
  }
177
178
  )
179
+ */
178
180
  .command(
179
181
  'linkDebug',
180
182
  '开启外链调试模式(在线上页面设计器端调试)',
@@ -43,7 +43,12 @@ module.exports = (config, cmpName, defaultComponentsDir = './src/components') =>
43
43
  fs.writeFileSync(`${tempCmpDir}/preview.jsx`, cmpPreviewContent);
44
44
 
45
45
  // 将临时预览文件添加到预览配置中
46
- config.dev.entry['index'] = `${tempCmpDir}/preview.jsx`;
46
+ if (!config.dev.entry) {
47
+ config.dev.entry = {};
48
+ }
49
+ // 添加预览入口文件
50
+ config.dev.entry.index = `${tempCmpDir}/preview.jsx`;
51
+
47
52
  if (config.webpack.projectDir) {
48
53
  config.webpack.projectDir.push(tempCmpDir);
49
54
  } else {