GitCafeDocsSign in
  1. screen
  2. /
  3. t3code-personal
Forked fromgitcafe/t3code
CodeIssuesPullsCIStacksSearchBranchesTags
  1. apps
  2. web
  3. vite
  4. tailwind.ts
Commits

Files

.agents
.agents
…
.claude
.claude
…
.cursor
.cursor
…
.devcontainer
.devcontainer
…
.github
.github
…
.macroscope
.macroscope
…
.repos
.repos
…
.vite-hooks
.vite-hooks
…
.vscode
.vscode
…
apps
apps
…
assets
assets
…
docs
docs
…
infra
infra
…
native
native
…
oxlint-plugin-t3code
oxlint-plugin-t3code
…
packages
packages
…
packaging
packaging
…
patches
patches
…
scripts
scripts
…
.coderabbit.yaml
.coderabbit.yaml
…
.env.example
.env.example
…
.gitattributes
.gitattributes
…
.gitignore
.gitignore
…
AGENTS.md
AGENTS.md
…
CLAUDE.md
CLAUDE.md
…
CONTRIBUTING.md
CONTRIBUTING.md
…
LICENSE
LICENSE
…
README.md
README.md
…
knip.jsonc
knip.jsonc
…
package.json
package.json
…
pnpm-lock.yaml
pnpm-lock.yaml
…
pnpm-workspace.yaml
pnpm-workspace.yaml
…
t3.json
t3.json
…
third-party-licenses.config.json
third-party-licenses.config.json
…
tsconfig.base.json
tsconfig.base.json
…
vite.config.ts
vite.config.ts
…

apps/web/vite/tailwind.ts

import tailwindcss from "@tailwindcss/vite";

/** Adapts Tailwind's dev hooks to Vite's experimental bundled mode. */
export function tailwindPlugins(bundledDev: boolean) {
  const plugins = tailwindcss();
  if (bundledDev) {
    for (const plugin of plugins) {
      // This hook expects Vite ModuleNodes and a server, which Rolldown does
      // not supply. Bundled dev tracks Tailwind's addWatchFile dependencies
      // and rebuilds CSS when those files change without this hook.
      delete plugin.hotUpdate;
    }
  }
  return plugins;
}