govuk-design-system icon indicating copy to clipboard operation
govuk-design-system copied to clipboard

Silence deprecation warnings raised by Sass while building the website

Open romaricpascal opened this issue 6 months ago • 2 comments
trafficstars

What

Silence the various deprecation warnings raised by Sass while the website is built and create an issue to address it in the future.

Why

Being reminded of all the deprecated features our code still uses adds a lot of noise to the build output, reducing our chances to spot actual issues or new deprecations or making it harder to spot our own logs. As addressing the deprecations are pieces of work in their own right, we'll want to record to actually address the deprecation in an issue so we don't forget and can hopefully tackle it ahead of Sass removing the deprecated feature.

Who needs to work on this

Developers

Who needs to review this

Developers

Done when

  • [ ] We've decided how to address the situation with sass-export
  • [ ] Deprecation warnings have been removed and issues created

romaricpascal avatar May 12 '25 16:05 romaricpascal

Interestingly, Sass files are compiled twice:

Unfortunately, the latter doesn't allow to pass options to the Sass compiler , so we'll need to figure a route for that. We may want to revisit how we extract the palette, maybe using postcss's AST instead to read the values we're after 🤔 (or use patch-package to adapt the library as it suits us, possibly before proposing a PR to it)

romaricpascal avatar May 12 '25 17:05 romaricpascal

In the meantime npm start 2>/dev/null gets rid of the warning noise

romaricpascal avatar May 12 '25 17:05 romaricpascal