BesLogic / releaf-canopeum

https://releaftrees.life/
5 stars 14 forks source link

Use `@use` instead of `@import` in scss (or reduce import duplication) #281

Closed Samuel-Therrien-Beslogic closed 1 week ago

Samuel-Therrien-Beslogic commented 1 week ago

See Sass: @import is Deprecated

I landed on this article after noticing that the entire global app CSS was being written multiple times in the page source on Cannopeum.

Changing @import '../App.scss' to @use '../App.scss' as * everywhere should the trick to have access to the variables.

Yikes! image

Fixed ! image

However the small fix applied above wasn't sufficient. Whilst rsuite is no longer loaded multiple times, bootstrap and our own style still are image

This is making re-rendering of CSS unecessarily slow and debugging especially annoying.