-
npm install babel-plugin-dash-import
-
.babelrc file
{ ... "plugins": [ ["dash-import", { libraryName: '@tencent/qd-base' }], ... ] ... }
-
import { OrgStaffPicker, SearchBox } from '@tencent/qd-base'; // transform to import OrgStaffPicker from "@tencent/qd-base/lib/org-staff-picker"; import SearchBox from "@tencent/qd-base/lib/search-box";
-
the plugin will do nothing if the libraryName is empty 😥
babel-plugin-dash-import
1.0.0 • Public • PublishedPackage Sidebar
Install
npm i babel-plugin-dash-import
Weekly Downloads
1
Version
1.0.0
License
ISC
Unpacked Size
2.25 kB
Total Files
4