From 8096fdfd527c96bb6e1c55d84272140cb0998493 Mon Sep 17 00:00:00 2001 From: chhu1 <1411365142@qq.com> Date: Wed, 2 Sep 2020 17:21:51 +0800 Subject: [PATCH] Update README.md (#510) --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 04584e1c..b3c9f254 100644 --- a/README.md +++ b/README.md @@ -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}`; } }