Skip to content

Commit

Permalink
Update README.md (umijs#510)
Browse files Browse the repository at this point in the history
  • Loading branch information
chhu1 committed Sep 2, 2020
1 parent 436b70c commit 0d8cf3f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,14 @@ And finally, you can use `customName` to customize each name parsing:
"import",
{
"libraryName": "antd",
"customName": (name: string) => {
"customName": (name: string, file: object) => {
const filename = file.opts.filename;
if (name === 'TimePicker'){
return 'antd/lib/custom-time-picker';
}
if (filename.indexOf('/path/to/my/different.js') >= 0) {
return 'antd/lib/custom-name';
}
return `antd/lib/${name}`;
}
}
Expand Down

0 comments on commit 0d8cf3f

Please sign in to comment.