Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

babel-plugin-emotion

emotion-js9mMIT11.0.0

A recommended babel preprocessing plugin for emotion, The Next Generation of CSS-in-JS.

styles, emotion, react, css, css-in-js

readme

changelog

babel-plugin-emotion

11.0.0

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.

11.0.0-rc.0

Major Changes

11.0.0-next.11

Patch Changes

11.0.0-next.10

Major Changes

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

11.0.0-next.8

Minor Changes

  • c643107 #1600 Thanks @joltmode! - Adjust how arrays passed to css prop are transformed so function elements can be resolved at runtime.

Patch Changes

11.0.0-next.6

Major Changes

  • 843bfb11 #1600 Thanks @Andarist! - Removed @emotion/css - it's main purpose was to allow css to be a Babel macro, but since babel-plugin-macros allows us to keep imports nowadays this is no longer needed. @emotion/core/macro has been added to account for this use case and appropriate changes has been made to babel-plugin-emotion to facilitate those changes.

    If you have used @emotion/css directly (it was always reexported from @emotion/core) or you have been using its macro then you should update your code like this:

    -import css from '@emotion/css'
    +import { css } from '@emotion/core'
    
    // or
    -import css from '@emotion/css/macro'
    +import { css } from '@emotion/core/macro'

Minor Changes

11.0.0-next.4

Major Changes

11.0.0-next.3

Major Changes

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

  • f9feab1a #1575 Thanks @mitchellhamilton! - Removed support for @emotion/styled-base package. It has been moved to @emotion/styled and is available as @emotion/styled/base. This simplifies how the regular and base versions relate to each other and eliminates problems with stricter package managers when @emotion/styled-base was not installed explicitly by a user.

Minor Changes

  • c5b12d90 #1220 Thanks @mitchellhamilton! - Added the importMap option which allows you to tell babel-plugin-emotion 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

Patch Changes

11.0.0-next.1

Patch Changes

11.0.0-next.0

Major Changes

  • 302bdba1 #1600 Thanks @mitchellhamilton! - Ensure packages are major bumped so that pre-release versions of the linked packages are consistent in the major number

Patch Changes

  • b0ad4f0c #1600 Thanks @Andarist! - Avoid transpiling vanilla emotion calls in already transpiled code to avoid double labels and such

10.0.33

Patch Changes

  • b9f8ae3 #1829 Thanks @Andarist! - Skip appending source maps & labels to Babel-transpiled tagged template expressions.

10.0.29

Patch Changes

10.0.28

Patch Changes

  • 4dfe558 #1731 Thanks @ndelangen! - Fixed an issue with adding label & target options to styled-related calls when those properties were already set, causing those properties to be duplicated. This could have happened for example when transpiling already transpiled code or when providing those options manually (latter being less likely).

  • af07afb #1761 Thanks @mansourkheffache! - Push source maps & labels to cooked/raw arrays in TS-transpiled tagged template expressions containing interpolations. This is a case not covered previously by #1538.

10.0.27

Patch Changes

10.0.23

Patch Changes

10.0.22

Patch Changes

10.0.21

Patch Changes

  • 0eafebb5 #1538 Thanks @Andarist! - Push source maps & labels to cooked/raw arrays in TS-transpiled tagged template expressions

10.0.20

Patch Changes

10.0.19

10.0.17

Patch Changes

10.0.16

Patch Changes

  • 1ea9b3a6 - Fix an inconsistency with Babel config ordering in the README

10.0.15

Patch Changes

10.0.14

Patch Changes

10.0.13

Patch Changes