Skip to content

Commit 8c7cede

Browse files
committed
Promote only common config until we have problems with webpack 2
1 parent 5f351d1 commit 8c7cede

File tree

1 file changed

+0
-65
lines changed

1 file changed

+0
-65
lines changed

README.md

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@ npm install postcss-loader --save-dev
2525

2626
## Usage
2727

28-
You can configure PostCSS Loader in common PostCSS config or directly
29-
in Webpack config. Common PostCSS config is recommended way, because
30-
many PostCSS tools will be able to share it.
31-
32-
### PostCSS Config
33-
3428
Add PostCSS Loader to `webpack.config.js`. Put it after `css-loader`
3529
and `style-loader`. But before `sass-loader`, if you use it.
3630

@@ -71,65 +65,6 @@ You can read more about common PostCSS config in [postcss-load-config].
7165

7266
[postcss-load-config]: https://github.com/michael-ciniawsky/postcss-load-config
7367

74-
### Webpack 2.x Config
75-
76-
```js
77-
module.exports = {
78-
module: {
79-
rules: [
80-
{
81-
test: /\.css$/,
82-
use: [
83-
'style-loader',
84-
{
85-
loader: 'css-loader',
86-
options: { importLoaders: 1 }
87-
},
88-
{
89-
loader: 'postcss-loader',
90-
options: {
91-
plugins: function () {
92-
return [
93-
require('postcss-smart-import')({ /* ...options */ }),
94-
require('precss')({ /* ...options */ }),
95-
require('autoprefixer')({ /* ...options */ })
96-
];
97-
}
98-
}
99-
}
100-
]
101-
}
102-
]
103-
}
104-
}
105-
```
106-
107-
### Webpack 1.x Config
108-
109-
```js
110-
module.exports = {
111-
module: {
112-
loaders: [
113-
{
114-
test: /\.css$/,
115-
loaders: [
116-
'style-loader',
117-
'css-loader?importLoaders=1',
118-
'postcss-loader'
119-
]
120-
}
121-
]
122-
},
123-
postcss: function () {
124-
return [
125-
require('postcss-smart-import')({ /* ...options */ }),
126-
require('precss')({ /* ...options */ }),
127-
require('autoprefixer')({ /* ...options */ })
128-
];
129-
}
130-
}
131-
```
132-
13368
## Options
13469

13570
### Syntaxes

0 commit comments

Comments
 (0)