1.2.0 • Published 3 years ago
build-tools-webpack-sass v1.2.0
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
]
};