GithubHelp home page GithubHelp logo

Comments (5)

ineshbose avatar ineshbose commented on June 9, 2024

Would this mean that we include something like !${nuxt.options.serverDir}/**/*.ts in the content? This may cause side-effects; some devs may be adding in styles from server-side possibly?

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?

from tailwindcss.

manniL avatar manniL commented on June 9, 2024

Would this mean that we include something like !${nuxt.options.serverDir}/**/*.ts in the content? This may cause side-effects; some devs may be adding in styles from server-side possibly?

I never worked with negative globs in the tailwind config. Not sure 🤔
Ideally this could be solved differently as I think it is reasonable to check server-styles (e.g. when rendering HTML via serve routes).

(cc @danielroe @pi0 so you are aware)

from tailwindcss.

ineshbose avatar ineshbose commented on June 9, 2024

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 '!./src/server/**/*.ts' to their content array.

from tailwindcss.

manniL avatar manniL commented on June 9, 2024

@ineshbose but what if the server (route e.g.) returns tailwind classes? 🤔
I think this is still a valid use case

from tailwindcss.

ineshbose avatar ineshbose commented on June 9, 2024

@ineshbose but what if the server (route e.g.) returns tailwind classes? 🤔

I think this is still a valid use case

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.

from tailwindcss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.