babel-plugin-dash-import

1.0.0 • Public • Published

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 : )

Readme

Keywords

Package 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

Last publish

Collaborators

  • renwangyu