Skip to content

Commit ec2b13e

Browse files
committed
Add browserslist recommendation
1 parent d642800 commit ec2b13e

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,28 @@ module.exports = {
127127
}
128128
```
129129

130+
### Autoprefixer
131+
132+
We don’t recommend to put Autoprefixer’s browsers to plugin options.
133+
Webpack `css-loader` contains `cssnano`. It uses Autoprefixer too.
134+
135+
As result you will have different browsers in Autoprefixer
136+
and CSS minification. At result, `css-loader` could clean some prefixes
137+
in production.
138+
139+
We recommend to put browsers in `browserslist` config in project root:
140+
141+
```
142+
last 2 versions
143+
ie 11
144+
```
145+
146+
As result other tools (for example, Stylelint) will use same browsers settings.
147+
148+
Also, [please vote] for disable second Autoprefixer in `css-loader`.
149+
150+
[please vote]: https://github.com/webpack/css-loader/issues/281
151+
130152
## Options
131153

132154
### Syntaxes

0 commit comments

Comments
 (0)