Emotion: Missing explanation on how to disable the auto prefixer

Created on 15 Jan 2021  路  1Comment  路  Source: emotion-js/emotion

In Emotion versions previous to 11 I used to disable CSS prefixing in development like this:

const emotionCache = createCache({
prefix: process.env.NODE_ENV === 'development' ? false : true,
})

Now the prefixer is a plugin of the Stylis parser and the prefix option has been removed.

If there is still a way to do that, you should write it in the documentation.
It's very difficult to use the browser console and live edit the CSS when there are vendor-prefixes all over the place.

documentation

Most helpful comment

const emotionCache = createCache({
  key: 'your-key',
  ...(process.env.NODE_ENV === 'development' && { stylisPlugins: [] }),
})

If there is still a way to do that, you should write it in the documentation.

Documentation PRs are always welcome!

>All comments

const emotionCache = createCache({
  key: 'your-key',
  ...(process.env.NODE_ENV === 'development' && { stylisPlugins: [] }),
})

If there is still a way to do that, you should write it in the documentation.

Documentation PRs are always welcome!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MrFungusEli picture MrFungusEli  路  3Comments

bitttttten picture bitttttten  路  3Comments

mitchellhamilton picture mitchellhamilton  路  3Comments

johnbrett picture johnbrett  路  3Comments

Aaron-Pool picture Aaron-Pool  路  3Comments