webpack-blocks - less
This is the less
block providing less support for webpack. Uses less
via less-loader
.
Usage
const createConfig = const less = moduleexports =
Use match()
to explicitly specify on which files to apply the block:
const createConfig match = const less = moduleexports =
Options
minimize (optional)
Enable CSS minification (by passing this option to css-loader
).
less options
You can pass any less-loader as an object to the less
block.
Examples
Extract text plugin
Use the extract-text
block to extract the compiled Less styles into a separate CSS file:
const createConfig match env = const less = const extractText = moduleexports =
Make sure you use the extract-text
block after the less
block.
CSS Modules
You can use Less in combination with CSS modules.
const createConfig match = const less = const css = moduleexports =
PostCSS
You can use the Less block together with PostCSS (using the postcss
block) and its plugins, like the Autoprefixer.
const createConfig match = const less = const postcss = const autoprefixer = ; moduleexports =
webpack-blocks
Check out the
Released under the terms of the MIT license.