babel-plugin-comby-import
基于babel-plugin-import 1.4.0,增加支持主题库配置
Usage
npm install babel-plugin-comby-import --save-dev
Via .babelrc
or babel-loader.
"plugins": "comby-import" options
options
options
can be object.
"libraryName": "antd" "style": true // or 'css'
"libraryName": "comby-lib-mobile" "libraryDirectory": "components" // default: lib "camel2DashComponentName": false // default: true "styleLibraryName": "comby-lib-mobile-theme" "styleDirectory": "src" //default: dist
"libraryName": "comby-lib-mobile" "styleLibraryPath": "/code/comby-lib-mobile/theme/src"
options
can be an array.
For Example:
"libraryName": "antd" "libraryDirectory": "lib" // default: lib "style": true "libraryName": "antd-mobile"
style
["import", { "libraryName": "antd" }]
: import js modularly["import", { "libraryName": "antd", "style": true }]
: import js and css modularly (LESS/Sass source files)["import", { "libraryName": "antd", "style": "css" }]
: import js and css modularly (css built files)