Skip to content

Switch from PostCSS/Autoprefixer/CSSNano to Parcel CSS#6591

Merged
aduth merged 1 commit intomainfrom
aduth-parcel-css
Aug 5, 2022
Merged

Switch from PostCSS/Autoprefixer/CSSNano to Parcel CSS#6591
aduth merged 1 commit intomainfrom
aduth-parcel-css

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Jul 15, 2022

Why:

  • Improved performance, both at build time and runtime.
  • Fewer dependencies to manage and maintain

I had tried this once before and the feature support with autoprefixing didn't have what we needed at the time (especially CSS mask used by a lot of USWDS icons), but it looks like this has since improved. Will be worth testing a bit more exhaustively to check overall support.

I also want to confirm more closely that the browserlist configuration is being used as expected.

Resources:

Impact:

yarn build:css (development bundling)

Before: ~3.5s
After: ~2.2s

NODE_ENV yarn build:css (production bundling with minification)

Before: ~5.3s
After: ~2.5s

NODE_ENV yarn build:css && brotli-size app/assets/builds/application.css (production stylesheet size)

Before: 36.6kb
After: 36.0kb

**Why**: Improved performance, both at build time and runtime.

changelog: Internal, Build, Improve stylesheet build performance
@aduth aduth force-pushed the aduth-parcel-css branch from 43728bf to a178687 Compare August 2, 2022 17:09
@aduth aduth marked this pull request as ready for review August 2, 2022 17:09
@aduth
Copy link
Contributor Author

aduth commented Aug 2, 2022

I gave this a thorough shake locally, spot-checking individual code differences (particularly on vendor prefixes like -webkit-), and went through critical flows across primary supported browsers.

Next I'm going to test this in my personal sandbox to make sure the binaries don't give us any trouble in deployment, but otherwise this is shaping up nicely to merge.

Edit: Looks good in my personal sandbox!

@aduth aduth merged commit e59299e into main Aug 5, 2022
@aduth aduth deleted the aduth-parcel-css branch August 5, 2022 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants