# apps/web/vite/tailwind.ts · gitcafe/t3code

[View on GitCafe](https://git.cafe/gitcafe/t3code/blob/cdd331b6c3f78bf24b039b09937b837d2d71a4e7/apps/web/vite/tailwind.ts)

Repository: [gitcafe/t3code](https://git.cafe/gitcafe/t3code)

Visibility: public

Requested revision: cdd331b6c3f78bf24b039b09937b837d2d71a4e7

Requested commit: cdd331b6c3f78bf24b039b09937b837d2d71a4e7

Commit: cdd331b6c3f78bf24b039b09937b837d2d71a4e7

Blob: 5726468a0595d5603d5bc5cdf5d2e61f437488d2

Size: 547 bytes

[Immutable source](https://git.cafe/gitcafe/t3code/blob/cdd331b6c3f78bf24b039b09937b837d2d71a4e7/apps/web/vite/tailwind.ts?format=markdown)

```
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;
}

```
