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

[v3] Tailwind utilities layer absent in production build when vite.build.minify is used #2810

Closed
vejja opened this issue Nov 30, 2024 · 3 comments
Labels
bug Something isn't working v3 #1289

Comments

@vejja
Copy link

vejja commented Nov 30, 2024

Environment



Is this bug related to Nuxt or Vue?

Nuxt

Version

v3.0.0-alpha.9

Reproduction

https://github.com/siyosu/nuxt-ui-v3
https://nuxt-ui-v3.vercel.app/

Courtesy @siyosu

Description

Hi, Nuxt-Security team here

We are investigating a bug report filed on our module here : nuxt-modules/security#576
We are able to reproduce based on OP's link.

We notice that the TailwindCSS utilities layer is absent from the production build.
This is related to the fact that our module has a { removeLoggers: true } default option set. If we set { removeLoggers: false }, the bug disappears and the utilities layer is present in the production build.

Additional context

Update.
Our investigation has found that the root cause of this issue is because we are setting the following option in nuxt.config.ts

vite : {
  build : {
    minify: true
  }
}

We are updating the title and description of the issue to further clarify that when vite.build.minify is set via defineNuxtConfig, the Tailwind utilities layer will be absent from the production build.

@vejja vejja added bug Something isn't working triage v3 #1289 labels Nov 30, 2024
@vejja vejja changed the title Tailwind utilities layer absent in production build when console and debugger statements removed by Vite [v3] Tailwind utilities layer absent in production build when console and debugger statements removed by Vite Nov 30, 2024
@vejja vejja changed the title [v3] Tailwind utilities layer absent in production build when console and debugger statements removed by Vite [v3] Tailwind utilities layer absent in production build when vite.build.minify is used Nov 30, 2024
@benjamincanac
Copy link
Member

Closing this as it's related to Tailwind CSS v4 vite plugin, you should open an issue in the tailwindcss repository.

@benjamincanac benjamincanac closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2024
@vejja
Copy link
Author

vejja commented Dec 13, 2024

@benjamincanac I did open an issue there : tailwindlabs/tailwindcss#15278
Just pinged you there because the Tailwind guys are making some comments that go far beyond my abilities

Copy link
Member

@vejja Before I answer on this issue, did you try alpha.10?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v3 #1289
Projects
None yet
Development

No branches or pull requests

2 participants