github emotion-js/emotion @emotion/babel-preset-css-prop@11.0.0

latest releases: @emotion/styled@11.11.5, @emotion/serialize@1.1.4, @emotion/is-prop-valid@1.2.2...
3 years ago

Major Changes

  • 9e3671c4 #2076 Thanks @Andarist! - 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

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

  • 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.

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.

  • 0a4a22ff #1651 Thanks @Andarist! - Allow labelFormat option to be a function.

Patch Changes

Don't miss a new emotion release

NewReleases is sending notifications on new releases.