Skip to content

Commit

Permalink
add sass example
Browse files Browse the repository at this point in the history
  • Loading branch information
smmoosavi committed Mar 30, 2017
1 parent ef3d39c commit fcdaf18
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,27 @@ module.exports = function (webpackConfig, isDevelopment) {
]);
};
```
related issues: [#462][462], [#662][662], [#900][900]
related issues: [#462][462], [#662][662], [#900][900]

## scss support
- install `node-sass` and `sass-loader`:

```
npm install --save-dev node-sass sass-loader
```

- edit `webpack.monkey.js` like this:
```js
/* copy addExclude, findLoader, addLoader, getScssLoader, createTextExtractor from snippets */
module.exports = function (webpackConfig, isDevelopment) {
addExclude(webpackConfig, /\.scss$/);
addLoader(webpackConfig, getScssLoader(isDevelopment));
};
```
similar code for less or stylus.

related issues: [#78][78], [#115][115], [#351][351], [#412][412], [#1509][1509], [#1639][1639]

## TODOs
- [ ] <del>add helpers</del> snippets
- [x] addPlugin
Expand Down Expand Up @@ -181,3 +201,10 @@ related issues: [#462][462], [#662][662], [#900][900]
[462]: https://github.com/facebookincubator/create-react-app/issues/462
[662]: https://github.com/facebookincubator/create-react-app/pull/662
[900]: https://github.com/facebookincubator/create-react-app/issues/900

[78]: https://github.com/facebookincubator/create-react-app/issues/78
[115]: https://github.com/facebookincubator/create-react-app/pull/115
[351]: https://github.com/facebookincubator/create-react-app/issues/351
[412]: https://github.com/facebookincubator/create-react-app/pull/412
[1509]: https://github.com/facebookincubator/create-react-app/pull/1509
[1639]: https://github.com/facebookincubator/create-react-app/issues/1639

0 comments on commit fcdaf18

Please sign in to comment.