Skip to content

Commit 17bffed

Browse files
committed
add postcss example
1 parent ddde12c commit 17bffed

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,20 @@ similar code for less or stylus.
172172

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

175+
## postcss config
176+
If you want change postcss config you can use this code.
177+
```js
178+
module.exports = function (webpackConfig, isDevelopment) {
179+
webpackConfig.postcss = function () {
180+
const postcssFunc = webpackConfig.postcss;
181+
return [
182+
require('postcss-inline-rtl'), // add new postcss plugin
183+
...postcssFunc() // keep cra postcss plugins
184+
]
185+
};
186+
};
187+
```
188+
175189
## TODOs
176190
- [ ] <del>add helpers</del> snippets
177191
- [x] addPlugin
@@ -182,7 +196,7 @@ related issues: [#78][78], [#115][115], [#351][351], [#412][412], [#1509][1509],
182196
- [x] addLoader
183197
- [ ] customize test runner (jest)
184198
- [ ] add more example
185-
- [ ] postcss
199+
- [x] postcss
186200
- [x] scss support
187201
- [x] decorator support
188202
- [x] relay support

0 commit comments

Comments
 (0)