Conditionally load rtl or ltr css style sheets


Is there an easy way to conditionally load rtl or lrt style sheets based on some condition?

I came up with the following solution, remove the import line and after all the imports i added:

var isRTL = true/false;//
if (isRTL) {
} else {

it worked perfectly in dev mode, but in production mode it just import both files.
Am I missing something? Could it be solved this way?

Any ideas are most welcomed.

1 Like