Remove styles in a component when unmounted

We have "flavors" that is set based on URL, but in test, we use query string to toggle, but it requires reloading the entire application because styles aren't unloaded once loaded. I have a layouts for each flavor with <style>import '[flavor]/styles';</style> in a component, and when I change to another layout it will load flavorB styles, but doesn't unload flavorA styles that is no longer loaded. How can I unload those styles when the layout gets unmounted?
5 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Brad Landis
Brad LandisOP2y ago
We don't use VueUse. Looking for a native way to do so in Nuxt.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Brad Landis
Brad LandisOP2y ago
Will it work if I use SCSS?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server