3 years ago

Optional Sass Import

Posted 3 years ago by macmotp

I recently had to import optional files in SASS. Apparently there is no way to do it like so (that would be perfect):

@import optional_file !optional

or like in LESS

@import (optional) optional_file 

There is an issue on GitHub here -> but it has not being solved, and maybe it will never be.

Do you know if there is a workaround, preferably not using js or webpack? Like "import if exists"?

Thank you

Please sign in or create an account to participate in this conversation.