From 7097a1dd773b2414066538f26f07f2ac7fdf526d Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Fri, 17 Feb 2017 10:33:48 -0500 Subject: [PATCH 1/2] make extracting Sass/LESS more clear --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index bb30f43f..98a19c53 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,36 @@ module.exports = { }; ``` +### Extracting Sass or LESS + +The configuration is the same, switch out `sass-loader` for `less-loader` when necessary. + +```js +const ExtractTextPlugin = require('extract-text-webpack-plugin'); + +module.exports = { + module: { + use: [ + { + test: /\.scss$/, + use: ExtractTextPlugin.extract({ + fallback: 'style-loader', + //resolve-url-loader may be chained before sass-loader if necessary + use: ['css-loader', 'sass-loader'] + }) + } + ] + }, + plugins: [ + new ExtractTextPlugin('style'css) + //if you want to pass in options, you can do so: + //new ExtractTextPlugin({ + // filename: 'style.css' + //}) + ] +} +``` +

Maintainer

From 3d9f8579891f335946284c4eacbb4f9bf5d833de Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Fri, 17 Feb 2017 10:34:31 -0500 Subject: [PATCH 2/2] fix typo in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 98a19c53..afa8bafd 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,7 @@ module.exports = { ] }, plugins: [ - new ExtractTextPlugin('style'css) + new ExtractTextPlugin('style.css') //if you want to pass in options, you can do so: //new ExtractTextPlugin({ // filename: 'style.css'