This repository was archived by the owner on Sep 12, 2023. It is now read-only.
Add autoprefixer #8
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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