Skip to content

Commit 9cbf092

Browse files
committed
Clean up docs
1 parent d2b8f39 commit 9cbf092

File tree

1 file changed

+17
-21
lines changed

1 file changed

+17
-21
lines changed

README.md

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -123,34 +123,30 @@ module.exports = {
123123
[webpack loader-context]: http://webpack.github.io/docs/loaders.html#loader-context
124124
[postcss-import]: https://github.com/postcss/postcss-import
125125

126-
## Integration with postcss-js
126+
## JS Styles
127127

128-
If you want to process styles written in Javascript you can use the [postcss-js] parser.
128+
If you want to process styles written in JavaScript
129+
you can use the [postcss-js] parser.
129130

130131
```js
131-
module.exports = {
132-
module: {
133-
loaders: [
134-
{
135-
test: /\.style.js$/,
136-
loader: "style-loader!css-loader!postcss-loader?parser=postcss-js"
137-
// Or using Babel
138-
// loader: "style-loader!css-loader!postcss-loader?parser=postcss-js!babel"
139-
}
140-
]
141-
},
142-
postcss: function (webpack) {
143-
return [
144-
postcssImport({
145-
addDependencyTo: webpack
146-
})
147-
];
148-
}
132+
{
133+
test: /\.style.js$/,
134+
loader: "style-loader!css-loader!postcss-loader?parser=postcss-js"
135+
// Or using Babel
136+
// loader: "style-loader!css-loader!postcss-loader?parser=postcss-js!babel"
149137
}
150138
```
151139

152-
[postcss-js]: https://github.com/postcss/postcss-js
140+
Or use can use even ES6 in JS styles by Babel:
153141

142+
```js
143+
{
144+
test: /\.style.js$/,
145+
loader: "style-loader!css-loader!postcss-loader?parser=postcss-js!babel"
146+
}
147+
```
148+
149+
[postcss-js]: https://github.com/postcss/postcss-js
154150

155151
## Custom Syntaxes
156152

0 commit comments

Comments
 (0)