Skip to content

[Bug]: tailwind.config.ts config changes not applied until full restart #6464

Open
@roonie007

Description

@roonie007

Version

System:
  OS: Linux 5.15 Ubuntu 24.04.1 LTS 24.04.1 LTS (Noble Numbat)
  CPU: (16) x64 12th Gen Intel(R) Core(TM) i5-12600K
  Memory: 15.63 GB / 27.30 GB
  Container: Yes
  Shell: 5.2.21 - /bin/bash
npmPackages:
  @modern-js/app-tools: 2.60.5 => 2.60.5 
  @modern-js/plugin-tailwindcss: 2.60.5 => 2.60.5 
  @modern-js/runtime: 2.60.5 => 2.60.5 
  @modern-js/tsconfig: 2.60.5 => 2.60.5 

Details

I followed this guide to integrate Tailwindcss and it works perfectly, but the problem is when I change the content of tailwind.config.ts nothing happens, I have to manually restart the server so the changes are applied.

Here is my modern.config.ts

import { appTools, defineConfig } from "@modern-js/app-tools";
import { tailwindcssPlugin } from "@modern-js/plugin-tailwindcss";

// https://modernjs.dev/en/configure/app/usage
export default defineConfig<"rspack">({
  runtime: {
    router: true,
  },
  plugins: [appTools({ bundler: "rspack" }), tailwindcssPlugin()],
  bff: {
    enableHandleWeb: true,
  },
  server: {
    ssr: true,
    port: Number(process.env.PORT || "3000"),
  },
  dev: {
    watchFiles: [
      {
        paths: "tailwind.config.ts",
        type: "reload-server",
      },
    ],
  },
});

As you can see I even added the tailwind.config.ts file to the watchFiles but still the server is not reloaded when I save.

Reproduce link

No Need

Reproduce Steps

  1. Start a new project
  2. Add TailwindCSS
  3. Make any change to the tailwind config file and save

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions