Skip to content

不应该比 server.proxy 配置优先级还高 #142

Open
@Leslie2014

Description

@Leslie2014

如果项目配置了 server.proxy,比如:

server: {
      proxy: {
        '/api': {
          target: env.VITE_API_BASE_URL,
        },
      },
    },

此时如果 mock 文件中也有 /api 相关请求,那么 proxy 的配置会不生效。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions