Skip to content

RobinMalfait/vite-double-tailwind-invocation

Repository files navigation

Reproduction

  1. Clone this repo
  2. Run npm install
  3. Run npm run dev
  4. Open the project in your browser. Very likely at http://localhost:5173/

Now everything is setup and you should see Generating CSS for /src/App.css in the terminal once.

  1. Open src/App.tsx and just save the file, nothing else. You can also use touch ./src/App.tsx in the terminal.
  2. Notice how there are 2 logs:
    Generating CSS for /src/App.css
    Generating CSS for /src/App.css
    

I expect to only see a single log when saving the file.

About this reproduction

  • I used the following command to create the Vite project:

    npm create vite@latest vite-double-tailwind-invocation
    cd vite-double-tailwind-invocation
    

    I picked React for the framework, and pressed Enter for all other options to pick the default.

  • Added a basic Vite plugin directly in vite.config.ts that mimics the problem. Added some comments in the file to explain what is going on.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published