mirror of
https://github.com/sunniejs/vue-h5-template.git
synced 2025-11-19 14:06:48 +08:00
19 lines
476 B
JavaScript
19 lines
476 B
JavaScript
import { API_BASE_URL, API_TARGET_URL, MOCK_API_BASE_URL, MOCK_API_TARGET_URL } from '../constant';
|
|
|
|
const init = {
|
|
// test
|
|
[API_BASE_URL]: {
|
|
target: API_TARGET_URL,
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(new RegExp(`^${API_BASE_URL}`), ''),
|
|
},
|
|
// mock
|
|
[MOCK_API_BASE_URL]: {
|
|
target: MOCK_API_TARGET_URL,
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(new RegExp(`^${MOCK_API_BASE_URL}`), ''),
|
|
},
|
|
};
|
|
|
|
export default init;
|