Skip to content

Commit

Permalink
Merge branch 'master' into next
Browse files Browse the repository at this point in the history
# Conflicts:
#	docs/css-prop.mdx
#	packages/babel-plugin/README.md
  • Loading branch information
Andarist committed Nov 9, 2020
2 parents 0d34200 + e67a57b commit 30ddee1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/css-prop.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ If you are using the compatible React version (`>=16.14.0`) then you can opt int
{ "runtime": "automatic", "importSource": "@emotion/react" }
]
],
"plugins": ["@emotion/babel-plugin"]
"plugins": [["@emotion/babel-plugin", { "cssPropOptimization": true }]]
}
```

Expand All @@ -58,7 +58,7 @@ In case you want to use the new JSX runtimes with [Next.js](https://nextjs.org/)
{
"presets": [
[
"next-babel",
"next/babel",
{
"preset-react": {
"runtime": "automatic",
Expand All @@ -67,7 +67,7 @@ In case you want to use the new JSX runtimes with [Next.js](https://nextjs.org/)
}
]
],
"plugins": ["@emotion/babel-plugin"]
"plugins": [["@emotion/babel-plugin", { "cssPropOptimization": true }]]
}
```

Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ const H1 = /*#__PURE__*/ styled('h1', {

### `cssPropOptimization`

`boolean`, defaults to `true`.
`boolean`, defaults to `true` if an import from `@emotion/react` is found in a file.

This option assumes that you are using something to make `@emotion/react`'s `jsx` function work for all jsx. If you are not doing so and you do not want such optimizations to occur, disable this option.

Expand Down

0 comments on commit 30ddee1

Please sign in to comment.