shunseven / express-proxy-mock

This is an express middleware that can be used with webpack and vite. Its main function is to visualize the configuration, manage http(s)-proxy, and mock data.
https://shunseven.gitbook.io/express-proxy-mock/
MIT License
9 stars 4 forks source link

vue.config.js里如何适配setupMiddlewares #30

Open MeMeLeevv opened 3 months ago

MeMeLeevv commented 3 months ago

setupMiddlewares: (middlewares, devServer) => { const { app } = devServer;

  // 使用 express-proxy-mock 插件
  ProxyMock(app);

  return middlewares;
},

这样写不起作用了,请问要如何适配?

shunseven commented 2 weeks ago

更新了 2.0 新版本可以试下