Skip to content

feat: add @blinkk/root-tailwind package with rootTailwind() plugin#928

Open
stevenle wants to merge 1 commit intomainfrom
codex/add-roottailwind-plugin-package
Open

feat: add @blinkk/root-tailwind package with rootTailwind() plugin#928
stevenle wants to merge 1 commit intomainfrom
codex/add-roottailwind-plugin-package

Conversation

@stevenle
Copy link
Member

Motivation

  • Provide a first-class Tailwind integration for Root.js that wires Tailwind into the Vite/PostCSS pipeline and follows Root conventions for stylesheet entry and content globs.
  • Ensure generated CSS is included via Root’s existing SSR/dev dependency injection path instead of relying on manual <link> tags.

Description

  • Add a new workspace package @blinkk/root-tailwind with packaging/build metadata (package.json, tsup.config.ts, tsconfig.json, CHANGELOG.md).
  • Implement rootTailwind() in packages/root-tailwind/src/core.ts that exposes options stylesheetEntry (default styles/index.css) and content globs (Root-focused defaults: routes, layouts, components, templates, elements).
  • Wire Tailwind into Vite by injecting a PostCSS Tailwind plugin using tailwindcss({ content }) and add a Vite plugin that auto-injects import '/styles/index.css' into route modules so Root will include the compiled CSS through its existing asset dependency graph.
  • Export DEFAULT_STYLESHEET_CONTENT containing the default Tailwind directives and add README.md showing pnpm install instructions, one-line root.config.ts usage, and migration steps from manual <link rel="stylesheet">.
  • Add a changeset for the new package and include @blinkk/root-tailwind in the monorepo fixed changeset group (.changeset/bright-planets-smell.md and updated .changeset/config.json).

Testing

  • Attempted pnpm install --lockfile-only to refresh lock metadata, but it failed due to environment/corepack network issues (proxy returned 403), so package manager actions were not completed.
  • No unit or integration tests were executed in this rollout.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant