fix: compile the standalone styles.css export instead of shipping raw Tailwind source - #52
Open
darrenapfel wants to merge 2 commits into
Open
fix: compile the standalone styles.css export instead of shipping raw Tailwind source#52darrenapfel wants to merge 2 commits into
darrenapfel wants to merge 2 commits into
Conversation
… raw Tailwind source The build previously copied src/styles.css verbatim to dist/styles.css, so the published @deepgram/ui/styles.css export contained Tailwind v4 source directives (@import "tailwindcss/...", @plugin) rather than compiled CSS. Any consumer following the README's 'import "@deepgram/ui/styles.css"' failed to build under current Vite (lightningcss rejects the un-expanded '@media prefix(dg)' block) and got no styles from the file under older bundlers. A second Vite pass (vite.styles.config.ts) now compiles the stylesheet through the existing @tailwindcss/vite plugin; no new dependencies. Also: - README quick start fixed: the example referenced an undefined 'conversation' variable; it now uses the useAgentConversation hook in a child component, matching packages/ui/README.md. - Status sections added to both READMEs stating the pre-1.0 nature of the package and naming @deepgram/sdk as the supported production path. Validated: 'npm run build' passes (tsc, vite build, styles pass); a clean-room Vite 8 app importing the packed tarball and styles.css builds with a 54.6 kB compiled CSS asset, where 0.1.4 fails. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Someone is attempting to deploy a commit to the Deepgram Team on Vercel. A member of the Team first needs to authorize it. |
Removes the positioning claims from the Status sections (the experimental label where it editorializes, and the steering of production integrations to @deepgram/sdk) while keeping the factual parts: pre-1.0, interfaces may change, release cadence, and the sibling-package map. Staged as a variant for the wording-alignment conversation Corey Weathers asked for; not pushed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Author
|
Per review: the positioning sentences ("experimental" and the production-path steering toward @deepgram/sdk) are replaced with neutral factual status wording (pre-1.0, interfaces may change) pending the wording-alignment conversation — the full before/after set is documented, and either version can land once the positioning call is made. 🤖 Generated with Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this fixes. The published
@deepgram/ui/styles.cssexport contains raw Tailwind version 4 source —@import "tailwindcss/..."and@plugindirectives — because the build copiessrc/styles.csstodist/verbatim (the copy-styles plugin inpackages/ui/vite.config.ts). Any consumer who follows the README'simport "@deepgram/ui/styles.css"instruction hits one of two failures: under current Vite (version 8, which minifies CSS with lightningcss), the build fails outright on the un-expanded@media prefix(dg)block; under older bundlers, the file passes through as CSS that browsers cannot interpret, so the import silently applies no styles.The change. A second Vite pass (
packages/ui/vite.styles.config.ts) compilessrc/styles.cssthrough the repository's existing@tailwindcss/viteplugin and writes the compiled output todist/styles.css. The build script runs it after the main build. No new dependencies. The copy-styles plugin is removed from the main config. Two documentation fixes ride along: the root README's quick-start referenced an undefinedconversationvariable and could not compile — it now uses theuseAgentConversationhook in a child component, matching the package README — and both READMEs gain a Status section stating the package's pre-1.0, experimental stage and naming@deepgram/sdkas the supported production path for the Voice Agent API.Validation.
npm run buildpasses (type check, main build, styles pass);dist/styles.cssis now compiled CSS beginning with the Tailwind compiler banner. A clean-room Vite 8 application that installs the packed tarball and follows the corrected quick-start, including the styles.css import, builds cleanly and emits a 54.6-kilobyte compiled CSS asset; the identical application against the published 0.1.4 fails to build. The bun-based unit tests were not run locally (bun was unavailable on the build machine); please rely on this repository's continuous integration for them.Provenance. This change was written by an artificial-intelligence coding agent operating on a local clone, at the direction of Darren Apfel, and was validated as described above. A human has reviewed the description; please review the diff with the usual scrutiny.
🤖 Generated with Claude Code