feat(cli): add namedExport option (#8495)

* feat(cli): add exportMode option

* feat(cli): rename exportMode to namedExport
This commit is contained in:
neverland
2021-04-10 11:44:02 +08:00
committed by GitHub
parent 92f6a6a662
commit 9bb19819a5
4 changed files with 76 additions and 22 deletions

View File

@@ -5,6 +5,8 @@
- [name](#name)
- [build.css](#buildcss)
- [build.site](#buildsite)
- [build.srcDir](#buildsrcdir)
- [build.namedExport](#buildnamedexport)
- [site.title](#sitetitle)
- [site.logo](#sitelogo)
- [site.description](#sitedescription)
@@ -124,6 +126,17 @@ module.exports = {
};
```
### build.namedExport
- Type: `boolean`
- Default: `false`
是否通过 Named Export 对组件进行导出。
未开启此选项时,会通过 `export default from 'xxx'` 导出组件内部的默认模块。
开启此选项后,会通过 `export * from 'xxx'` 导出组件内部的所有模块、类型定义。
### site.title
- Type: `string`