styled-components: Classname ordering problem since 2.1.2
Version
styled-components@2.1.2 babel-plugin-styled-components@1.1.7 (SSR enabled, no preprocessing)
Reproduction / Steps to reproduce
I don’t have repro steps right now, but I’m seeing an issue with the order of how the generated classes are concatenated in v2.1.2, specifically in NODE_ENV=production. Downgrading to v2.1.1 fixes it.
I have a component chain that looks like this:
1. BaseSVG = ({ height, width, ...props }) => <svg {...props} />
2. Icon = styled(BaseSVG)
3. Arrow = Icon.extend.attrs({ viewBox: '0 0 63 40' })
4. StyledArrow = styled(Arrow)
For some reason, the generated class name for #4
is being concatenated before #2
.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (13 by maintainers)
I’m going to move this into a new issue since the conversation has kind of diverged.