Skip to content

Releases: styled-components/babel-plugin-styled-components

v2.0.0

21 Nov 15:18
Compare
Choose a tag to compare

What's Changed

  • Change topLevelPaths option to take a regexp pattern by @rockwotj in #354

Full Changelog: v1.13.3...v2.0.0

v1.13.3

18 Oct 15:28
Compare
Choose a tag to compare
  • when there are multiple assignments prefer the outer name (#355) thanks @rockwotj
  • minor dependency updates

v1.13.2

08 Jul 14:59
Compare
Choose a tag to compare
  • added some conditional guards to code paths that lead to errors for some consumers (0c16c1b)
  • dependency updates
  • teach babel plugin about certain spread application scenarios with "css" prop #339
  • handle namespace import (import * as styled from 'styled-components') properly #340

v1.13.2-test.1

06 Jul 15:52
Compare
Choose a tag to compare
v1.13.2-test.1 Pre-release
Pre-release

Teach the plugin how to handle namespace import syntax properly, fixes #315 e.g.

import * as styled from 'styled-components'

const css = styled.css`
  background: black;
`

const GlobalStyle = styled.createGlobalStyle`
  html {
    background: black;
  }
`

const Test = styled.default.div`
  color: red;
`

const before = styled.default.div`
  color: blue;
`

styled.default.div``

export default styled.default.button``

v1.13.2-test.0

06 Jul 14:38
Compare
Choose a tag to compare
v1.13.2-test.0 Pre-release
Pre-release

Fix #337 #332 (spread application involving local variable inside of css prop resulting in build error)

v1.13.1

29 Jun 18:12
Compare
Choose a tag to compare

Fix one edge case with object key interpolation from v1.13.0

v1.13.0

29 Jun 17:16
Compare
Choose a tag to compare
  • teach the plugin how to handle variable interpolation in object keys, e.g.

    css={{
      [theme.breakpoint.sm]: {
        color: 'red'
      } 
    }}
  • plugin now emits transient props when replacing css prop calls (cuts down on garbage in the DOM for s-c 5.1+)

  • merge withConfig arguments to allow for shouldForwardProp, thanks @ithinkdancan #323

  • move injected components to end of file scope, thanks @sfishel18

  • Ensure sc- prefix is always added #313, thanks @chalbert

v1.12.1

29 Jun 15:26
Compare
Choose a tag to compare
  • Resolve operability issue with rollup (see #327), thanks @ktranada

  • Update dependencies

v1.12.0

20 Nov 18:35
8537e1d
Compare
Choose a tag to compare
  • Add topLevelImportPaths option (#288)

    This functionality allows the composer to specify alternate import locations for the "styled" constructor, for instance if you are using a third party library that wraps styled-components and does additional processing. See this test for how to use it.

  • preserve structure of JSX member expressions in generated ast nodes; this makes sure that other babel transformations that rename variables will be able to process the ast nodes created by this plugin. fixes #240

v1.11.1

30 Jul 16:19
Compare
Choose a tag to compare

Revert #283, it caused a major build performance regression