Skip to content

Commit

Permalink
Remove the runtime option from @emotion/babel-preset-css-prop (#2076
Browse files Browse the repository at this point in the history
)

* Remove `runtime` option from `@emotion/babel-preset-css-prop`

* Update .changeset/weak-pears-design.md

* Update packages/babel-preset-css-prop/src/index.js

Co-authored-by: Mitchell Hamilton <mitchell@hamil.town>
  • Loading branch information
Andarist and emmatown committed Nov 9, 2020
1 parent 30ddee1 commit 9e3671c
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 830 deletions.
5 changes: 5 additions & 0 deletions .changeset/weak-pears-design.md
@@ -0,0 +1,5 @@
---
'@emotion/babel-preset-css-prop': major
---

Removed `runtime` option that was introduced to this preset and deprecated shortly after that. If you want to configure `runtime: "automatic"`, replace `@emotion/babel-preset-css-prop` with `@babel/preset-react` and `@emotion/babel-plugin`. You can find out how to configure things properly here: https://emotion.sh/docs/css-prop#babel-preset
9 changes: 7 additions & 2 deletions babel.config.js
Expand Up @@ -34,15 +34,20 @@ module.exports = api => {
filename &&
isTestFile(filename) &&
filename.includes('automatic-runtime'),
presets: [[emotionDevPreset, { runtime: 'automatic' }]]
presets: [
[emotionDevPreset, { runtime: 'automatic', useEmotionPlugin: true }]
]
},
{
test: filename =>
filename &&
isTestFile(filename) &&
filename.includes('automatic-dev-runtime'),
presets: [
[emotionDevPreset, { runtime: 'automatic', development: true }]
[
emotionDevPreset,
{ runtime: 'automatic', development: true, useEmotionPlugin: true }
]
]
}
]
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 9e3671c

Please sign in to comment.