Category: Variables
-
Deployment environment variables Nuxt3 with bitbucket & docker
Had quite a few issues setting this up with our Bitbucket deployments. Most overlooked fact was needing to prefix variables remotely with NUXT_ for private variables. And NUXT_PUBLIC_ for public variables. For example an ENV variable needs — NUXT_PUBLIC_FLAG_BASE_URL & accessed via process.env.FLAG_BASE_URL or process.env.flagBaseUrl This also applies to Netlify, Vercel etc. Environment config (Bitbucket…
-
Environment variables in Nuxt3
There are a few way to access environment variables in Nuxt3. How depends on where you are trying to access them. Middleware & Plugins Pages, Components & Layouts Within the <script setup> block. Store files Has to be called inside an action or getter Service files (GRPC) This seems trickier on a server or deployment…