chore(dev): move local API default port to 3010
Avoid conflict with another local service on 3000; align Vite proxies and docs.
This commit is contained in:
@@ -16,7 +16,7 @@ export default defineConfig(async () => ({
|
||||
plugins: ['@tarojs/plugin-html'],
|
||||
defineConstants: {
|
||||
/** H5 静态托管无 /api 代理时直连后端;dev 构建可通过 VITE_API_TARGET 覆盖 */
|
||||
TARO_APP_API_ORIGIN: JSON.stringify(process.env.VITE_API_TARGET ?? 'http://localhost:3000'),
|
||||
TARO_APP_API_ORIGIN: JSON.stringify(process.env.VITE_API_TARGET ?? 'http://localhost:3010'),
|
||||
},
|
||||
copy: {
|
||||
patterns: [],
|
||||
@@ -44,7 +44,7 @@ export default defineConfig(async () => ({
|
||||
host: '0.0.0.0',
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: process.env.VITE_API_TARGET ?? 'http://localhost:3000',
|
||||
target: process.env.VITE_API_TARGET ?? 'http://localhost:3010',
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user