1.0.0 • Published 4 years ago
babel-plugin-dash-import v1.0.0
babel-plugin-dash-import
install
npm install babel-plugin-dash-import
use
.babelrc file
{ ... "plugins": [ ["dash-import", { libraryName: '@tencent/qd-base' }], ... ] ... }
effect
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";
options
libraryName is required!
the plugin will do nothing if the libraryName is empty 😥
for fun : )
1.0.0
4 years ago