fix(create-nocobase-app): process.env.API_URL='/api/'

This commit is contained in:
chenos 2021-11-01 17:25:29 +08:00
parent b5c587fc94
commit 5a7f3e1709

View File

@ -8,15 +8,13 @@ dotenv.config({
process.env.MFSU_AD = 'none'; process.env.MFSU_AD = 'none';
const baseUrl = `http://localhost:${process.env.API_PORT || '13001'}/`;
export default defineConfig({ export default defineConfig({
favicon: '/favicon.png', favicon: '/favicon.png',
nodeModulesTransform: { nodeModulesTransform: {
type: 'none', type: 'none',
}, },
define: { 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', 'process.env.API_PORT': process.env.API_PORT || '13001',
}, },
proxy: { proxy: {