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•2y ago
Message Not Public
Sign In & Join Server To View
We don't use VueUse. Looking for a native way to do so in Nuxt.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Will it work if I use SCSS?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View