Git Product home page Git Product logo

Comments (2)

adamwathan avatar adamwathan commented on May 29, 2024

Hey! What's the situation that's causing you to run Tailwind against minified JS instead of against the original source files?

from tailwindcss.

Oskar-Nilsen-Roos avatar Oskar-Nilsen-Roos commented on May 29, 2024

Hey! What's the situation that's causing you to run Tailwind against minified JS instead of against the original source files?

Right, should've clarified! In our use-case we have a Vue components library which is tree-shaken and then consumed by 10+ applications which make up individual fragments of a website (usually called micro frontends). We then generate the css files for each application as it's built, by pointing the content prop in the tailwind config to the built js file of the application.

So one solution would definitely be to go against the source files, generate a components.css and then include that css with each application. However, this would cause a lot of css duplication on every single page.

I understand that this is a niche issue, and probably not a way you intended for it to be used, so I don't expect you to change the code to suite this need!

Can you see any other way to solve this while avoiding as much code duplication as possible? Or maybe come across someone solving using tailwind in a similar structure?

Thank you!

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.