NuxtN
Nuxt15mo ago
Joaquín

why nuxt not exposing `NUXT_` nor `NUXT_PUBLIC_` env entries in `import.meta.env`?

When configuring custom entries via vite.define or runtimeConfig.publicthere is no way to access them via import.meta.env.
The only way is using .env file + VITE_ prefix: I need some entries in a service worker (firebase stuff for example)

https://github.com/vite-pwa/vite-plugin-pwa/discussions/762#discussioncomment-10843259
Was this page helpful?