yarn add kerber-server -D
and then add the AutoStyledWebpackPlugin to the webpack config:
var RewirePlugin = require("rewire-webpack");
var webpackConfig = {
plugins: [
new RewirePlugin()
]
};
{
"library": "element-ui",
"style": "style" // string | function
}
{
"library": "element-ui",
"style": function style(rawRequest, name) {
return `${rawRequest}/css/${name.toLowerCase()}.css`;
}
}
This repository is inspired by babel-plugin-import but webpack version.
- Work with tree shaking, import on demand
- Support Async Components
- Does not modify js code, only append style modules on webpack dependency