Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
Merge pull request #413 from scottdj92/master
Browse files Browse the repository at this point in the history
Make documentation regarding extracting Sass/LESS clearer
  • Loading branch information
bebraw authored Feb 17, 2017
2 parents 91befda + 3d9f857 commit 78d0947
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
//})
]
}
```

<h2 align="center">Maintainer</h2>

<table>
Expand Down

0 comments on commit 78d0947

Please sign in to comment.