tailwindcss-jit-cdn icon indicating copy to clipboard operation
tailwindcss-jit-cdn copied to clipboard

Add autoprefixer

Open karaggeorge opened this issue 4 years ago • 0 comments

Since tailwind usually adds prefixes itself (https://tailwindcss.com/docs/browser-support#vendor-prefixes), I think this module might need to as well, otherwise some of the classes don't work properly.

I understand that this might increase the bundle size a lot, and even on the CLI it's an optional flag, so maybe it should create two separate bundles and document both, so if you want the autoprefixer and don't mind the extra size you can use it.

Or, it could be an extra option, and we load the autoprefixer dependency dynamically separately

It is sad that we load all of caniuse/browserlist when we know the exact browser this is running in, maybe there is a better solution?

Additionally adds logic to append the VIRTUAL_HTML_FILENAME key to the purge array, since if we load a user's config, their local file purge list will overwrite this and it won't actually apply any classes. Workaround for that is to modify the config before passing it to this module, but might be nice to handle the merge more gracefully

karaggeorge avatar Oct 13 '21 17:10 karaggeorge