Skip to content

fix: import styled-components named export#194

Open
simPod wants to merge 2 commits intomhnpd:masterfrom
simPod:fix/styled-components-esm-import
Open

fix: import styled-components named export#194
simPod wants to merge 2 commits intomhnpd:masterfrom
simPod:fix/styled-components-esm-import

Conversation

@simPod
Copy link
Copy Markdown

@simPod simPod commented May 5, 2026

Summary

  • replace default styled-components imports with named styled imports
  • fixes native ESM/SSR consumers where import styled from 'styled-components' resolves to a CJS namespace object without .div, .svg, etc.
  • add jest-util as an explicit dev dependency to satisfy ts-jest's peer dependency and keep npm test working from a clean install

Verification

  • npm ci
  • npm run typecheck
  • npm test
  • npm run build
  • node --input-type=module -e \"const spinner = await import('./dist/index.mjs'); console.log(typeof spinner.Oval); const oval = await import('./dist/oval.mjs'); console.log(typeof oval.Oval);\"
  • node -e \"const spinner = require('./dist/index.cjs'); console.log(typeof spinner.Oval);\"

@simPod simPod marked this pull request as ready for review May 5, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant