Currently, I am utilizing a Vue component (cli .vue) and facing the challenge of selectively displaying my stylesheet based on a boolean value.
To put it simply: When myVar==false, the component should not load its styles.
<style v-if="myVar" lang="scss"> @import 'mystyles.css' </style>
Although achieving this directly is not possible, I am seeking alternative methods to achieve a similar outcome.
I aim to only load my styles in Vue if the user desires to apply default styles. Otherwise, I want to prevent them from loading.
It's important to note that my component will be used multiple times on a page, and the condition for using or ignoring default CSS needs to be applied consistently across all instances.
Do you have any suggestions or insights on how to approach this? Your help and ideas are greatly appreciated :)