Major Changes
-
b8476e08
#1675 Thanks @mitchellhamilton! - Renamebabel-plugin-emotion
to@emotion/babel-plugin
. Please replace"plugins": ["emotion"]
with"plugins": ["@emotion"]
in your Babel config. -
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
-
b7d21373
#2080 Thanks @Andarist! -cssPropOptimization
defaults now totrue
regardless of the@emotion/react
import presence.
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. -
5e803106
#1893 Thanks @Andarist! - Added support for converting assignment expressions to labels in cases like this:styles = css`` Timeline.Item = styled.li`` Timeline.Item.Anchor = styled.a``
-
0a4a22ff
#1651 Thanks @Andarist! - AllowlabelFormat
option to be a function. -
5c7ec859
#1805 Thanks @Andarist! - Requirements for a label extraction have been relaxed. In certain situations it was previously required for a containing function to have a PascalCased name. -
828111cd
#1639 Thanks @Andarist! -Global
gets handled by the Babel plugin now - this gives inline css-less expressions source maps.
Patch Changes
-
b0ad4f0c
#1602 Thanks @Andarist! - Avoid transpiling vanilla emotion calls in already transpiled code to avoid double labels and such -
9e998e37
#1817 Thanks @Andarist! - Fixed an issue in our tagged template expressions minifier which has caused whitespace before nested orphaned pseudo selectors being incorrectly removed. In a selector like& :hover
the whitespace before colon has a semantic meaning and needs to be preserved. -
Updated dependencies [
e3d7db87
,8a896a31
,5c55fd17
,a085003d
,5d692a6a
,c6431074
]:- @emotion/serialize@1.0.0