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
Nuxt's import protection triggers #811
Comments
Would this mean that we include something like Although the module would still be resolving the right content, while this seems to be the user-input causing the issue - so they would have to narrow the paths accordingly. What do you think? |
I never worked with negative globs in the tailwind config. Not sure 🤔 (cc @danielroe @pi0 so you are aware) |
The module doesn't automatically add the serverDir; the dev has added that explicitly in the configuration (being user input), so I would ask them to narrow the glob and/or add |
@ineshbose but what if the server (route e.g.) returns tailwind classes? 🤔 |
Yes you're right and I would assume that some devs may have already configured Tailwind according to it and have their adaptive solutions - if anyone can post that'll be great. 😊 But as the warning mentions, these classes may not be in server files but possibly a shared JSON and/or the same classes are somewhere in the non-serverDir code as well - so server added classes aren't unique. |
Version
@nuxtjs/tailwindcss: 6.11.4
nuxt: 3.10.2
Reproduction Link
https://stackblitz.com/edit/github-hoyhk3?file=tailwind.config.ts,package.json
Steps to reproduce
What is Expected?
No error
What is actually happening?
Nuxt's import protection is triggering
Workaround
Remove the
content
in the Tailwind Config, then restart the server.This means that files from
server/
are not imported and analyzed anymore, not triggering the protection.Related
nuxt/nuxt#25534
nuxt/nuxt#25162
The text was updated successfully, but these errors were encountered: