#DotEnv-Vars are not exposed to integrations

3 messages · Page 1 of 1 (latest)

rapid mulch
#

Hey,

I want to have a little extra build step in my app and thought about using a local integration. It seems like vites dotEnv-Vars are not accessible from within integrations. I tried it via import.meta.env.CMS_API and process.env.CMS_API.

fleet nexusBOT
#
Quiet in here?

It looks like no-one has responded to your question yet. People might not be available right now or don’t know how to answer your question. Want an answer while you wait? Try asking our experimental bot in #1095492539085230272.

wooden sandal
#

You can try using the loadenv helper from Vite ```js
import { loadEnv } from "vite";
const { SECRET_PASSWORD } = loadEnv(import.meta.env.MODE, process.cwd(), "");