After the project has set up webpack proxy, how to package and deploy the release?

api.js

export async function getAdminUser(params) {
  return request(`/api/admin/user/` + params);
}

.webpackrc.js

  proxy: {
    "/api/admin": {
      target: "http://48.xxx.xxx.xx:8080/",    // 
      changeOrigin: true,
    },
  },
The

project uses a proxy, and the proxy api connects to the test server
what changes should I make if I want to package and publish to the official server now?


proxy only works in development mode. Please configure the proxy service (Nginx, etc.) online.

Menu