discuss icon indicating copy to clipboard operation
discuss copied to clipboard

Is there a way I can compile only my custom config items?

Open mikebronner opened this issue 5 years ago • 1 comments

I have a custom brand color in my tailwind config. Is there an easy way I can compile only my customizations? I'm currently using Laravel Mix for the compilation using webpack and postcss for the CSS and parsing.

I have a special use-case where I need to compile a minimum amount, and then include the CDN version of tailwind. It's a 3rd-party site I'm styling, and they won't allow uploads of large css files.

Any recommendations would be supper appreciated! :) 🙏 Thanks

mikebronner avatar Dec 27 '19 22:12 mikebronner

Update: what I have done so far, and it seems to work, is to comment out tailwind base and utilities from my css file, like so:

@import "https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css";

/* @import "tailwindcss/base"; */

@import "tailwindcss/components";
@import "components/my-thing.css";

/* @import "tailwindcss/utilities"; */

Is this the right way to go about it, or will I encounter issues?

mikebronner avatar Dec 28 '19 15:12 mikebronner