how can I import a dynamically file from environment variables?
My scope is to include a general theme scss for a specific client, to my app.vue (or main.ts)
I would like to do something like this:
<style lang="sass">
@import"./themes/" + process.env.VUE_APP_CLIENT + "/assets/scss/theme.scss";
</style>
or
import "./themes/" + process.env.VUE_APP_CLIENT + "/assets/scss/theme.scss";
How can I accomplish this?
if I do it via import
(on top of main.ts) it says
Object is possibly 'undefined'.
if I do it via <style>
and @import
(inside my app.vue)
undefined ^ Media query expression must begin with '('
Any idea of how to do it?