-
I am currently setting up my monorepo with turborepo and I am wondering how I would use environment variables in my extension. I checked the docs but didn't find anything. Sorry if I missed it. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Didn't miss anything, see Vite's docs for environment variables: https://vitejs.dev/guide/env-and-mode.html WXT doesn't change anything, but environment variables aren't available everywhere, like when reading your entrypoints to generate the manifest. If you want to use env variables to configure content script matches for example, you won't be able to use env variables for that. See https://discord.com/channels/1212416027611365476/1224505556346212515/1230108944102326282 |
Beta Was this translation helpful? Give feedback.
Didn't miss anything, see Vite's docs for environment variables: https://vitejs.dev/guide/env-and-mode.html
WXT doesn't change anything, but environment variables aren't available everywhere, like when reading your entrypoints to generate the manifest.
If you want to use env variables to configure content script matches for example, you won't be able to use env variables for that. See https://discord.com/channels/1212416027611365476/1224505556346212515/1230108944102326282