Skip to content
This repository was archived by the owner on Jul 31, 2026. It is now read-only.

feat(package): stabilize CSS export - #343

Merged
alx-xo merged 1 commit into
mainfrom
alexm/fix-css-export-issue
Jun 3, 2026
Merged

feat(package): stabilize CSS export#343
alx-xo merged 1 commit into
mainfrom
alexm/fix-css-export-issue

Conversation

@alx-xo

@alx-xo alx-xo commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Update the public ./moonshine.css export to point at the built CSS artifact, dist/moonshine.css
  • Pin Vite's library CSS filename to moonshine so the export map no longer depends on an implicit tool default
  • Mark CSS files as package side effects so consumer bundlers preserve Moonshine styles during tree-shaking

Root Cause

  • The Vite 8 upgrade changed the library CSS build artifact from dist/style.css to dist/moonshine.css.
  • Moonshine's package export map still resolved @speakeasy-api/moonshine/moonshine.css to dist/style.css, so consumers could import the documented public path but their bundler could not find the target file.
  • The package also declared sideEffects: false despite importing CSS, which made the CSS contract brittle for consumer bundlers that tree-shake side-effect imports.

Test Plan

  • pnpm test --run
  • pnpm type-check
  • pnpm lint
  • pnpm build
  • node export metadata check confirmed ./moonshine.css resolves to an existing dist/moonshine.css file and CSS sideEffects are declared

@alx-xo
alx-xo force-pushed the alexm/fix-css-export-issue branch from 0fa4ae0 to 8b27e58 Compare June 3, 2026 19:15
@alx-xo alx-xo changed the title fix(package): correct CSS export path feat(package): stabilize CSS export Jun 3, 2026
@alx-xo
alx-xo merged commit 8905764 into main Jun 3, 2026
5 checks passed
@alx-xo
alx-xo deleted the alexm/fix-css-export-issue branch June 3, 2026 19:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant