Originally published at: Using Environment Variables in Nuxt 3 - Server Side Up
There’s only a slight difference in how to reference environment variables from Nuxt 2 to Nuxt 3. Nuxt 3 provides a simple composable that you can include in your setup() method. Nuxt 2 set the environment variables in a global $config variable. The functionality is similar, but the syntax is slightly different, let’s take a…