Add CSS autoprefixer (resolves #255) #266
Merged
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.
This adds
autoprefixer
for CSS prefixing. (Which is a follow-up re: PR review feedback in #246 (comment) / #255).As part of making this change, I moved the browserslist config that was specified inline in the Webpack config out to a
.browserslistrc
file (it could just as well be added as abrowserslist
key topackage.json
-- could go either way on that personally), so that the same browser list will be used bybabel-preset-env
andautoprefixer
/ otherpostcss
plugins.This build config change currently only results in a tiny difference to the generated browser JS bundle: it adds prefixes to the two places
user-select
CSS rules are used (it turns out no other rules need prefixing currently).(If you use Glitch you can visit https://glitch.com/edit/#!/comparewebpackbuildoutput?path=README.md:17:168 to quickly generate a diff like the above to confirm that only the two lines above are affected; the non-CSS JS build output remains the same, showing that nothing seems to have broken when moving around the browserslist config, and that the prefixing is not overly aggressive)