loading different scss file based on current language - nuxt

Viewed 220

i'm trying to implement rtl/ltr in my nuxt application. this is my project structure

|--assets
   |--scss
     |--**/*.scss
     |--bundle.scss
     |--bundle-rtl.scss

so styles are compiled into the bundle and bundle-rtl normally. the problem is this .. how can i switch between theses two scss files without changing them manually within my nuxt.config (automatically change the scss file when the language is changed). among these files is a mixin file with many mixins related to rtl and ltr switching so i need to use them in each vue file that i have. which is why i can't just compile them to css (with gulp or webpack for example) and include them in head. aside from all of this, is this the best way to implement ltr/rtl in nuxt or is there a better way?

1 Answers
Related