Emotion: Autoprefixer ignores configuration

Created on 7 Aug 2017  路  2Comments  路  Source: emotion-js/emotion

  • emotion version: 7.0.11
  • react version: 16.0.0-alpha.13

Relevant code.

const Styled = styled.div`
  display: flex;
`

Problem description:
I tried to configure Autoprefixer by setting the Browserslist config in a few ways

  • Using the browserslist key in the package json:
"browserslist": [
  "last 1 Chrome version"
],
  • Having a .browserslistrc
[production]
last 1 Chrome version

[development]
last 1 Chrome version
  • Setting the BROWSERSLIST environment variable. BROWSERSLIST="last 1 Chrome version"

What happened:

Only when setting the env variable did I get the expected result:

.css-1fe3owl {
    display: flex;
}

In the other two cases I got:

.css-71uu79 {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

Most helpful comment

Released in 7.0.12

All 2 comments

Released in 7.0.12

Works like a charm. Only, as far as I can tell, keyframes still seem to be prefixed unnecessarily.

Was this page helpful?
0 / 5 - 0 ratings