From cb12c8a72cb6cb58c285445157c06654f020cab0 Mon Sep 17 00:00:00 2001 From: Mila <Mila@pollex.com.tw> Date: 星期三, 24 十一月 2021 09:09:49 +0800 Subject: [PATCH] add: 設定多個環境 .env 檔 (install @nuxtjs/dotenv / cross-env) --- PAMapp/nuxt.config.js | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/PAMapp/nuxt.config.js b/PAMapp/nuxt.config.js index 2ae6c63..b151e66 100644 --- a/PAMapp/nuxt.config.js +++ b/PAMapp/nuxt.config.js @@ -50,7 +50,9 @@ // https://go.nuxtjs.dev/typescript '@nuxt/typescript-build', '@nuxtjs/axios', - '@nuxtjs/style-resources' + '@nuxtjs/style-resources', + ['@nuxtjs/dotenv', { filename: '.env.' + process.env.ENV }], + ], // Modules: https://go.nuxtjs.dev/config-modules @@ -74,8 +76,5 @@ document.documentElement.scrollTop = 0; } } - }, - env: { - BASE_URL: 'http://localhost:8080/api' } } -- Gitblit v1.8.0