Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 3.14 KB

File metadata and controls

41 lines (29 loc) · 3.14 KB

@x.render/style-webpack-plugin

NPM version

NPM Downloads

中文文档

Introduce

Style processing plugin

Usage

npm i @x.render/style-webpack-plugin -D
import StyleWebpackPlugin from "@x.render/style-webpack-plugin";

StyleWebpackPlugin.getConfig(compiler, config, options);

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.