babel-plugin-import
一个轻量的按需加载库
Install
npm install light-babel-import --save-dev
Example
Converts
to
var _isUrl =
styleLibraryName Example
Converts
to
var button =
Usage
Via .babelrc
or babel-loader.
"plugins": "light-babel-import" options
Multiple Module
"plugins": xxx "light-babel-import" libraryName: "antd" style: true "antd" "light-babel-import" libraryName: "test-module" style: true "test-module"