Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v4] @tailwindcss/vite crashing dev server with _ has already been declared errors #15250

Open
huntabyte opened this issue Nov 30, 2024 · 2 comments · May be fixed by #15274
Open

[v4] @tailwindcss/vite crashing dev server with _ has already been declared errors #15250

huntabyte opened this issue Nov 30, 2024 · 2 comments · May be fixed by #15274

Comments

@huntabyte
Copy link

huntabyte commented Nov 30, 2024

What version of Tailwind CSS are you using?

4.0.0-beta.4 for both tailwindcss and @tailwindcss/vite

What build tool (or framework if it abstracts the build tool) are you using?

Svelte 5/Vite

What version of Node.js are you using?

v20.15.1

What browser are you using?

Chrome

What operating system are you using?

macOS

Reproduction URL

https://github.com/huntabyte/tw-v4-monorepo-repro/tree/main

Repro info below can also be found in the README.md of the reproduction repo.

This reproduction contains the following:

  • ui package which exports a (in reality would be) styled Button component which uses a primitive headless component from bits-ui.
  • docs package which uses ui and @tailwindcss/vite@next & tailwindcss@next.

Reproduction Steps

  1. pnpm install && pnpm dev in the root of the repo (will build the ui package and start the docs dev server)
  2. Notice that the page renders and all is well.
  3. Open the docs/vite.config.ts file and add tailwindcss() to the plugins array / save the file.
  4. Notice the dev server crashes with a bunch of pre-transform errors (p has already been declared).
  5. Remove the tailwindcss() plugin from the docs/vite.config.ts file and save the file.
  6. Notice that the dev server starts as normal.

Describe your issue

Working in a pnpm monorepo, @tailwindcss/vite@next causes the dev server to crash with vite pre-transform - p has already been declared errors.

@huntabyte huntabyte changed the title @tailwindcss/vite crashing dev server & possibly(?) scanning unnecessary deps [v4] @tailwindcss/vite crashing dev server & possibly(?) scanning unnecessary deps Nov 30, 2024
@huntabyte huntabyte changed the title [v4] @tailwindcss/vite crashing dev server & possibly(?) scanning unnecessary deps [v4] @tailwindcss/vite crashing dev server with _ has already been declared errors Nov 30, 2024
@rose21wiley

This comment was marked as spam.

@sgcullen
Copy link

sgcullen commented Dec 2, 2024

Also experiencing the error @huntabyte is experiencing

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

Successfully merging a pull request may close this issue.

4 participants