I got a VUEJS setup with vite, tailwindcss and postcss and would like to define different colors depending on variables within a .env.name file in order to use different color themes depending where the code is deployed.
I tried with a .env file containing
VITE_COLOR="FF0000"
and an import within the tailwind.config.js
...
theme: {
colors: {
primary: import.meta.env.COLOR
}
}
...
but i get the following error:
SyntaxError: Cannot use 'import.meta' outside a module
What do i have to change or is there even a better way?