Style processing plugin
npm i @x.render/style-webpack-plugin -D
import StyleWebpackPlugin from "@x.render/style-webpack-plugin";
StyleWebpackPlugin.getConfig(compiler, config, options);
Name | Type | Required | Default | Description |
---|---|---|---|---|
miniCssExtractPluginLoaderOptions | Object |
No | refer to mini-css-extract-plugin's loader | |
miniCssExtractPluginOptions | Object |
No | refer to mini-css-extract-plugin | |
styleLoaderOptions | Object |
No | refer to style-loader | |
cssLoaderOptions | Object |
No | refer to css-loader | |
lessLoaderOptions | Object |
No | refer to less-loader | |
sassLoaderOptions | Object |
No | refer to sass-loader | |
postcssLoaderOptions | Object |
No | refer to postcss-loader | |
inlineStyle | Boolean |
No | false | The css code is integrated into the output code and does not generate a separate css file. |
styleSourceMap | Boolean |
No | true | Whether to generate a css source map is valid for the production environment and the development environment is always enabled. |
useRpx | Boolean |
No | true | When the css unit uses rpx, the plug-in will be converted into vm unit to achieve mobile compatibility. |