1.2.0 • Published 3 years ago

build-tools-webpack-less v1.2.0

Weekly downloads
9
License
MIT
Repository
github
Last release
3 years ago

npm version

build-tools-webpack-less

Set of tools and utilities to work with webpack and Less.

Install

npm install --save-dev build-tools-webpack-less

Usage

In webpack.config.js:

const { rules: lessRules } = require('build-tools-webpack-less');

module.exports = {
  module: {
    rules: [
      ...lessRules,
      ... // other loaders
    ]
  }
};

To allow extraction of CSS in production, set NODE_ENV=production and adjust webpack.config.js:

const {
  rules: lessRules,
  plugin: lessExtractPlugin
} = require('build-tools-webpack-less/extract');

module.exports = {
  module: {
    rules: [
      ...lessRules,
      ... // other loaders
    ]
  },
  plugins: [
    lessExtractPlugin
  ]
};

Links