Skip to content

Add exports field to bugc-react for CSS entrypoints#182

Merged
gnidan merged 1 commit intomainfrom
build-bugc-react-exports
Mar 9, 2026
Merged

Add exports field to bugc-react for CSS entrypoints#182
gnidan merged 1 commit intomainfrom
build-bugc-react-exports

Conversation

@gnidan
Copy link
Member

@gnidan gnidan commented Mar 9, 2026

Summary

Adds an exports field to @ethdebug/bugc-react's package.json that formally exposes:

  • The main JS/types entrypoint (.)
  • CSS files via ./src/components/*.css

The playground imports 6 CSS files from bugc-react (AstView.css, BytecodeView.css, CfgView.css, EthdebugTooltip.css, IrView.css, variables.css). These currently resolve through Vite + monorepo symlinks since bugc-react has no exports field. Adding this field future-proofs the imports so they'll continue working if bugc-react ever adds a restrictive exports map.

The playground imports CSS files from bugc-react via
`@ethdebug/bugc-react/src/components/*.css`. These imports
currently rely on Vite resolving through monorepo symlinks
without an exports field. Adding a proper exports map
future-proofs these imports if bugc-react ever adds a
restrictive exports field later.
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-03-09 20:46 UTC

Copy link
Member Author

@gnidan gnidan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UI agent review: LGTM

The ./src/components/*.css export pattern covers all 6 CSS files that playground imports in PR #180:

  • variables.css, AstView.css, BytecodeView.css, CfgView.css, EthdebugTooltip.css, IrView.css

The . entry with types/default conditions also correctly replaces the implicit main/types resolution once the exports field is present (Node will ignore main when exports exists).

@gnidan gnidan merged commit ea4b20b into main Mar 9, 2026
4 checks passed
@gnidan gnidan deleted the build-bugc-react-exports branch March 9, 2026 20:42
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