You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ Compatible with [antd](https://github.com/ant-design/ant-design), [antd-mobile](
16
16
| set libDir |`lib: 'antd', libDir: 'es'`|`import {Button} from 'antd'`|`import Button from 'antd/es/Button'`|
17
17
| use style |`lib: 'antd', style: 'index.css'`|`import {Button} from 'antd'`|`import Button from 'antd/lib/Button' import 'antd/lib/Button/index.css'`|
18
18
| translate camel |`lib: 'antd', camel2: '-'`|`import {MyComponent} from 'antd'`|`import MyComponent from 'antd/lib/my-component'`|
19
+
| componentDirMap |`lib: 'antd', camel2: '-',componentDirMap: {MyComponent: 'YourComponent'}`|`import {MyComponent} from 'antd'`|`import MyComponent from 'antd/lib/YourComponent'`|
19
20
20
21
21
22
### Usage
@@ -55,6 +56,7 @@ module.exports = {
55
56
-**style**: should append style file to a component? value is relative path to style file.
56
57
-**camel2**: should translate MyComponent to my-component, value is the join string.
57
58
-**existCheck**: should check if import file exist, only import file when exits, default will check. To close this check set `existCheck=null`.
59
+
-**componentDirMap**: a map to store Component Entry Dir in lib by ComponentName, it's structure should be `{ComponentName:ComponentDir}`,default is `{}`.
58
60
59
61
## Diff with babel-plugin-import
60
62
1. babel-plugin-import is a babel plugin, which means must be used in project with babel.
0 commit comments