Repository navigation
fix(build): rename .browerslistrc to .browserslistrc - #769
Merged
Merged
Conversation
The browserslist config file has been misspelled since it was added in db8765a (missing the "s" in "browserslist"), so browserslist has never read it and autoprefixer has been running against its built-in defaults instead. Drop the ie 10, ie 11 and edge 16 targets at the same time. All three are end of life (IE 10 in 2020, IE 11 in 2022, EdgeHTML in 2021), and because the file was never read, the site has never actually shipped the -ms- prefixes they ask for. Keeping them while fixing the filename would add about 12 KB of -ms-flex declarations to the stylesheet for IE 10, which would be a change in shipped output rather than a fix. Removing them keeps the resolved target list identical to what the site builds today. Signed-off-by: Vadim Bauer <Bauer.vadim@gmail.com>
Superseded by .browserslistrc. Signed-off-by: Vadim Bauer <Bauer.vadim@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The browserslist config file is named
.browerslistrc, missing thesin "browserslist". It has been misspelled since it was introduced in db8765a ("Add Edge support and IE-friendly JavaScript"), so browserslist has never read it. There is also nobrowserslistkey inpackage.jsonand no other config, so autoprefixer has been running against its built-indefaultsquery this entire time.Verification
Measured with the versions this repo actually pins (
autoprefixer@9.8.5,postcss-cli@7.1.2), running the same invocation Hugo issues, overbulma@0.8.0:.browerslistrc(today)edge 151/150/149,ie 11.browserslistrc, contents unchangededge 151/150/149,edge 16,ie 11,ie 10.browserslistrc, EOL targets dropped (this PR)edge 151/150/149,ie 11So a pure rename is not a no-op. It would newly pull in
ie 10and add roughly 12 KB of-ms-flex*declarations to the stylesheet:Isolating the two targets:
ie 10accounts for essentially all of it (241,406 B),edge 16for about 33 B.What this PR does
Renames the file and drops
ie 10,ie 11andedge 16from it.All three are end of life: IE 10 in January 2020, IE 11 in June 2022, EdgeHTML in March 2021. More to the point, because the file was never read, the site has never shipped the
-ms-prefixes those lines ask for. Keeping them while fixing the filename would be a change to published output, not a fix. Dropping them makes the config live while leaving the resolved target list byte-identical to what the site builds today.Resulting file:
Alternative
If the project does want IE 10 support restored, say so and I will drop the second hunk and keep the original contents. That is the explicit tradeoff: about 12 KB of extra CSS on every page load for a browser that has been unsupported for six years.
Notes
Found while reviewing #763 (browserslist lock bump). Independent of that PR and of #745/#756, which touch the CSS toolchain for other reasons.