From 96b8922137effb08bd0ff08b28399aa0efd28dab Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Wed, 10 Apr 2024 16:25:29 +0200 Subject: [PATCH] Remove environment variables page from Turbopack docs --- docs/pages/pack/docs/features/_meta.json | 3 +- .../docs/features/environment-variables.mdx | 29 ------------------- 2 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 docs/pages/pack/docs/features/environment-variables.mdx diff --git a/docs/pages/pack/docs/features/_meta.json b/docs/pages/pack/docs/features/_meta.json index 695ab3b899b59..57bc6e9cfef20 100644 --- a/docs/pages/pack/docs/features/_meta.json +++ b/docs/pages/pack/docs/features/_meta.json @@ -5,6 +5,5 @@ "css": "CSS", "dev-server": "Dev Server", "static-assets": "Static Assets", - "imports": "Imports", - "environment-variables": "Environment Variables" + "imports": "Imports" } diff --git a/docs/pages/pack/docs/features/environment-variables.mdx b/docs/pages/pack/docs/features/environment-variables.mdx deleted file mode 100644 index 4e6daec082a31..0000000000000 --- a/docs/pages/pack/docs/features/environment-variables.mdx +++ /dev/null @@ -1,29 +0,0 @@ -# Environment variables - -## `.env` files - -Turbopack will parse and inject `.env` files out of the box. - -``` -NEXT_PUBLIC_DEPLOYMENT_NAME="my-site" -DATABASE_URL="postgres://" -``` - -This includes all the variations these files come in: - -``` -.env -.env.local -.env.development -.env.production.local -``` - -### Live reloading - -Not only that, but Turbopack will live reload when these values change. Restarting your dev server just to inject a new environment variable can be extremely annoying - Turbopack does it for you. - -## `process.env` - -Environment variables will be injected into `process.env`. For instance, `DATABASE_URL` will be on `process.env.DATABASE_URL`. - -This follows the tradition of Node.js, webpack 5 and Next.js 12, which each use `process.env` for variable injection.