Chowa UI component library modular import plugin
npm install babel-plugin-chowa-import --save-dev
{
rules: [
{
test: /\.js$/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env', '@babel/preset-react'],
plugins: [
['chowa-import', { style: 'css' }]
]
}
}
}
]
}
{
"presets": [
["@babel/preset-env", {
"targets": {
"browsers": ["last 2 versions", "safari >= 7"]
},
"modules": false,
"useBuiltIns": "usage"
}],
"@babel/preset-react"
],
"plugins": [
["chowa-import", { style: 'scss' }]
]
}
{
style?: 'css' | 'sass';
}