1.2.0 • Published 3 years ago

build-tools-webpack-sass v1.2.0

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

npm version

build-tools-webpack-sass

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

Install

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

Usage

In webpack.config.js:

const { rules: sassRules } = require('build-tools-webpack-sass');

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

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

const {
  rules: sassRules,
  plugin: sassExtractPlugin
} = require('build-tools-webpack-sass/extract');

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

Links