Skip to content

Commit

Permalink
Update README.md (#510)
Browse files Browse the repository at this point in the history
  • Loading branch information
chhu1 authored Sep 2, 2020
1 parent 0c2eabe commit 8096fdf
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 8096fdf

Please sign in to comment.