Skip to content

Remove cssnano#2619

Merged
lfdebrux merged 1 commit intomainfrom
ldeb-remove-cssnano
Mar 11, 2026
Merged

Remove cssnano#2619
lfdebrux merged 1 commit intomainfrom
ldeb-remove-cssnano

Conversation

@lfdebrux
Copy link
Contributor

@lfdebrux lfdebrux commented Mar 11, 2026

What problem does this pull request solve?

Previously we were using cssnano to minify our CSS, however, we were also getting warnings when running bin/vite build from esbuild which was also trying to minify our CSS and unable to parse the output of cssnano.

Instead of trying to minify our CSS twice, we've decided just to use the Vite default, which is esbuild. This commit removes cssnano from this project.

The size of the output CSS is slightly increased as a result of this change;

  • using cssnano the output CSS is 151386 bytes,
  • with esbuild the output CSS is 154086 bytes;

but we think it's not a large enough increase to be an issue.

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Do the end to end tests need updating before these changes will pass?
  • Has all relevant documentation been updated?

Previously we were using cssnano to minify our CSS, however, we were
also getting warnings when running `bin/vite build` from esbuild which
was also trying to minify our CSS and unable to parse the output of
cssnano.

Instead of trying to minify our CSS twice, we've decided just to use the
Vite default, which is esbuild. This commit removes cssnano from this
project.

The size of the output CSS is slightly increased as a result of this
change;

- using cssnano the output CSS is 151386 bytes,
- with esbuild the output CSS is 154086 bytes;

but we think it's not a large enough increase to be an issue.
@lfdebrux lfdebrux force-pushed the ldeb-remove-cssnano branch from ee14bc1 to 25d9b56 Compare March 11, 2026 08:23
@sonarqubecloud
Copy link

@github-actions
Copy link

🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-2619.admin.review.forms.service.gov.uk/

It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

Copy link
Contributor

@DavidBiddle DavidBiddle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code change looks good and it's well explained 🎉

@lfdebrux lfdebrux added this pull request to the merge queue Mar 11, 2026
Merged via the queue into main with commit 3ab8d94 Mar 11, 2026
6 of 7 checks passed
@lfdebrux lfdebrux deleted the ldeb-remove-cssnano branch March 11, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants