mock.js 356 字节
Newer Older
1 2 3
/* eslint-disable @typescript-eslint/no-var-requires */

const {middleware} = require('@visualdl/mock');
4
const {createProxyMiddleware} = require('http-proxy-middleware');
5 6

module.exports = {
7 8 9
    middleware: process.env.MOCK
        ? () => createProxyMiddleware({target: process.env.MOCK, changeOrigin: true})
        : middleware,
10 11
    pathname: '/api'
};