From 5a7f3e17090508fd8128ab95c3609c5f02b7d9ef Mon Sep 17 00:00:00 2001 From: chenos Date: Mon, 1 Nov 2021 17:25:29 +0800 Subject: [PATCH] fix(create-nocobase-app): process.env.API_URL='/api/' --- packages/create-nocobase-app/templates/AppGenerator/.umirc.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/create-nocobase-app/templates/AppGenerator/.umirc.ts b/packages/create-nocobase-app/templates/AppGenerator/.umirc.ts index ece48c38f..ed96bdd56 100644 --- a/packages/create-nocobase-app/templates/AppGenerator/.umirc.ts +++ b/packages/create-nocobase-app/templates/AppGenerator/.umirc.ts @@ -8,15 +8,13 @@ dotenv.config({ process.env.MFSU_AD = 'none'; -const baseUrl = `http://localhost:${process.env.API_PORT || '13001'}/`; - export default defineConfig({ favicon: '/favicon.png', nodeModulesTransform: { type: 'none', }, define: { - 'process.env.API_URL': process.env.API_URL || `${baseUrl}api/`, + 'process.env.API_URL': process.env.API_URL || `/api/`, 'process.env.API_PORT': process.env.API_PORT || '13001', }, proxy: {