Skip to content

Commit

Permalink
Pass .env variables to the frontend that can be exposed
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofVDB1 committed May 29, 2024
1 parent 419dfc0 commit 5f8a3b3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ import { fileURLToPath } from 'url'
// console.log(JSON.stringify(routes, null, 4))

export default defineNuxtConfig({
runtimeConfig: {
// private runtime env variables. Think of api keys: https://nuxt.com/docs/guide/going-further/runtime-config#environment-variables
// This is needed to pass the .env variables to the build process
ENVIRONMENT: import.meta.env.VITE_ENVIRONMENT,
// public runtime env variables
// public: {}
},
// https://nuxt.com/docs/getting-started/deployment#static-hosting
routeRules: {
// serve root as ssr
Expand Down Expand Up @@ -95,4 +102,4 @@ export default defineNuxtConfig({
],
}
}
})
})

0 comments on commit 5f8a3b3

Please sign in to comment.