Download Latest Version v2.3.0 source code.zip (180.4 kB)
Email in envelope

Get an email when there's a new version of babel-plugin-styled-components

Home / v2.2.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-05-20 1.1 kB
v2.2.0 source code.tar.gz 2026-05-20 85.0 kB
v2.2.0 source code.zip 2026-05-20 166.7 kB
Totals: 3 Items   252.8 kB 0

Minor Changes

  • a40e3f7: Refresh the toolchain and fix a handful of css-prop transform bugs that had crept in under recent Babel versions.
    • When a file already imports styled and also uses one or more css={…} props, every styled component now keeps its display name and stable component id. Previously the cache that tracks the local default import could be overwritten on each css-prop usage, which silently dropped the display name and id for the surrounding styled.div declarations.
    • css={{ [foo]: bar }} with a non-primitive value no longer fails Babel's validator. Computed keys are preserved through the css-prop object rewrite.
    • Friendlier error messages when the css-prop transform encounters a JSX name shape it can't infer, instead of a confusing internal ReferenceError.
    • Long-running watch processes (Next dev, webpack-dev-server, jest watch) no longer leak import-detection state between files.
    • Removed the runtime lodash dependency. The plugin now ships with @babel/core as a declared peer.
    • Dev tooling moved to pnpm and changesets. Plugin behavior is unchanged.
Source: README.md, updated 2026-05-20