From 2ef4db5743ff6f0c8824f003fc33b0b8913e2825 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Tue, 26 Apr 2022 20:52:36 +0200 Subject: [PATCH 1/4] docs: Use `runtimeConfig` in migration guide --- docs/content/migration/8.runtime-config.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/content/migration/8.runtime-config.md b/docs/content/migration/8.runtime-config.md index 12e08fec039..377b5c99c43 100644 --- a/docs/content/migration/8.runtime-config.md +++ b/docs/content/migration/8.runtime-config.md @@ -13,7 +13,7 @@ When referencing these variables within your components, you will have to use th ## Migration -1. Add any environment variables you use in your app to your `publicRuntimeConfig` or `privateRuntimeConfig`. +1. Add any environment variables you use in your app to `runtimeConfig` in `nuxt.config.ts`. 1. Migrate `process.env` to `useRuntimeConfig` throughout the Vue part of your app. ## Example @@ -25,9 +25,9 @@ import { defineNuxtConfig } from 'nuxt' export default defineNuxtConfig({ runtimeConfig: { - secretKey: '', // variables that can only be accessed on server-side + secretKey: '', // variable that can only be accessed on server-side public: { - BASE_URL: process.env.BASE_URL || 'https://nuxtjs.org' + BASE_URL: process.env.BASE_URL || 'https://nuxtjs.org' // variable that can also be accessed on the client-side } }, }) From 082843f1c15b11d31ed209cd21b94ca448b24fb6 Mon Sep 17 00:00:00 2001 From: pooya parsa Date: Wed, 27 Apr 2022 11:03:53 +0200 Subject: [PATCH 2/4] Update docs/content/migration/8.runtime-config.md Co-authored-by: Damian <48835293+DamianGlowala@users.noreply.github.com> --- docs/content/migration/8.runtime-config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/migration/8.runtime-config.md b/docs/content/migration/8.runtime-config.md index 377b5c99c43..e4c0801ae09 100644 --- a/docs/content/migration/8.runtime-config.md +++ b/docs/content/migration/8.runtime-config.md @@ -13,7 +13,7 @@ When referencing these variables within your components, you will have to use th ## Migration -1. Add any environment variables you use in your app to `runtimeConfig` in `nuxt.config.ts`. +1. Add any environment variables that you use in your app to the `runtimeConfig` property of the `nuxt.config` file. 1. Migrate `process.env` to `useRuntimeConfig` throughout the Vue part of your app. ## Example From 1ef9168b98696ec61fd06b30879a6f10f4d94536 Mon Sep 17 00:00:00 2001 From: pooya parsa Date: Wed, 27 Apr 2022 11:03:58 +0200 Subject: [PATCH 3/4] Update docs/content/migration/8.runtime-config.md Co-authored-by: Damian <48835293+DamianGlowala@users.noreply.github.com> --- docs/content/migration/8.runtime-config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/migration/8.runtime-config.md b/docs/content/migration/8.runtime-config.md index e4c0801ae09..d88d08538b7 100644 --- a/docs/content/migration/8.runtime-config.md +++ b/docs/content/migration/8.runtime-config.md @@ -25,7 +25,7 @@ import { defineNuxtConfig } from 'nuxt' export default defineNuxtConfig({ runtimeConfig: { - secretKey: '', // variable that can only be accessed on server-side + secretKey: '', // variable that can only be accessed on the server side public: { BASE_URL: process.env.BASE_URL || 'https://nuxtjs.org' // variable that can also be accessed on the client-side } From 116dcb99e0ef0f44a7dcbc4ac5d681a76ef6c8f9 Mon Sep 17 00:00:00 2001 From: pooya parsa Date: Wed, 27 Apr 2022 11:04:02 +0200 Subject: [PATCH 4/4] Update docs/content/migration/8.runtime-config.md Co-authored-by: Damian <48835293+DamianGlowala@users.noreply.github.com> --- docs/content/migration/8.runtime-config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/migration/8.runtime-config.md b/docs/content/migration/8.runtime-config.md index d88d08538b7..33ddf98b997 100644 --- a/docs/content/migration/8.runtime-config.md +++ b/docs/content/migration/8.runtime-config.md @@ -27,7 +27,7 @@ export default defineNuxtConfig({ runtimeConfig: { secretKey: '', // variable that can only be accessed on the server side public: { - BASE_URL: process.env.BASE_URL || 'https://nuxtjs.org' // variable that can also be accessed on the client-side + BASE_URL: process.env.BASE_URL || 'https://nuxtjs.org' // variable that can also be accessed on the client side } }, })