Major Changes
-
9e3671c4
#2076 Thanks @Andarist! - Removedruntime
option that was introduced to this preset and deprecated shortly after that. If you want to configureruntime: "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 -
c5b12d90
#1220 Thanks @mitchellhamilton! - Removed support for theinstances
option, any usage of it should be replaced with theimportMap
option -
c7850e61
#1656 Thanks @Andarist! -autoLabel
option no longer is a simple boolean. Instead we accept now 3 values:dev-only
(the default),always
andnever
.Each possible value for this option produces different output code:
- with
dev-only
we optimize the production code, so there are no labels added there, but at the same time we keep labels for development environments, - with
always
we always add labels when possible, - with
never
we disable this entirely and no labels are added.
- with
Minor Changes
-
c5b12d90
#1220 Thanks @mitchellhamilton! - Added theimportMap
option which allows you to tell@emotion/babel-plugin
what imports it should look at to determine what it should transform so if you re-export Emotion's exports, you can still use the Babel transforms -
c672175b
#1130 Thanks @jtmthf! - Adjust how arrays passed to css prop are transformed so function elements can be resolved at runtime. -
0a4a22ff
#1651 Thanks @Andarist! - AllowlabelFormat
option to be a function.