From 52a82a5fe41add0dd73e29a3f50cbab229fceb8c Mon Sep 17 00:00:00 2001 From: CazSaa <cazsaaltink@gmail.com> Date: Fri, 22 Oct 2021 09:02:18 +0200 Subject: [PATCH] Work with .env. Fix issue #23 --- nuxt.config.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nuxt.config.js b/nuxt.config.js index 5b6d483..dd72701 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -16,6 +16,12 @@ export default { ] }, + env: { + // baseUrl: process.env.API_BASE_URL || 'localhost', + mode: process.env.MODE || 'production', + port: process.env.PORT || 3000 + }, + // Global CSS: https://go.nuxtjs.dev/config-css css: [ '@/assets/css/windi.css' @@ -61,7 +67,7 @@ export default { axios: { // baseURL: 'http://localhost:3001/' - proxy: true + proxy: process.env.MODE === 'development' }, proxy: { -- GitLab