Skip to content

Dev server proxy context do not work with the glob syntax #2947

Closed
@dousybox

Description

@dousybox

Version

3.1.1

Reproduction link

https://github.com/DousyBox/vue-multipages

Node and OS info

Node 8.11.4 / npm 5.6.0 / Windows 10

Steps to reproduce

with default settings, run command blow:

npm install
npm run serve

It will open the default browser automatically, and then you can get the error message in browser.

What is expected?

Pass the request to pathRewrite, and redirect the request.

What is actually happening?

Can not match the request url, and got an error


Please forgive me for bad English, a supplementary explanation is below:

I written a local mock server with the webpack-dev-server built-in proxy. and it work very well.

It just match the request url like "/mock/**/*.json", and redirect to the local server and load the matched json file in {workspace}/static/mock .

I use glob sntax to write the proxy context, I find this syntax is working in http-proxy-middleware.

It works in the webpack-dev-server too, but when I use Vue Cli 3 to do this things, I got an error.

Please help me to fix this issue, or can give me anyother way to make it works.

Thank you very much.

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