github emotion-js/emotion @emotion/babel-plugin@11.0.0

latest releases: @emotion/css@11.13.4, @emotion/utils@1.4.1, @emotion/serialize@1.3.2...
3 years ago

Major Changes

  • b8476e08 #1675 Thanks @mitchellhamilton! - Rename babel-plugin-emotion to @emotion/babel-plugin. Please replace "plugins": ["emotion"] with "plugins": ["@emotion"] in your Babel config.

  • c5b12d90 #1220 Thanks @mitchellhamilton! - Removed support for the instances option, any usage of it should be replaced with the importMap option

  • c65c5d88 #1622 Thanks @Andarist! - Drop Babel 6 support

  • c7850e61 #1656 Thanks @Andarist! - autoLabel option no longer is a simple boolean. Instead we accept now 3 values: dev-only (the default), always and never.

    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.
  • b7d21373 #2080 Thanks @Andarist! - cssPropOptimization defaults now to true regardless of the @emotion/react import presence.

Minor Changes

  • c5b12d90 #1220 Thanks @mitchellhamilton! - Added the importMap 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! - Allow labelFormat 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

Don't miss a new emotion release

NewReleases is sending notifications on new releases.