Skip to content

config.devServer.proxy doesn't proxy, shows NotFound.vue #1550

Open
@THAlpha

Description

@THAlpha
  • I confirm that this is an issue rather than a question.

Bug report

Version Tried in 0.14.11 and 1.0.0-alpha.47

Steps to reproduce

  • Start a new vuepress project
  • Create a .vuepress/config.js file with below config:
module.exports = {
  configureWebpack: (config, isServer) => {
    config.devServer = {
      proxy: {
        '^/auth': {
          target: 'http://localhost:7070',
          ws: true,
          changeOrigin: true
        }
      }
    };
  }
};
  • Run Vuepress dev (assuming port 8080)
  • Navigate to http://localhost:8080/auth/{anything}

What is expected?

Should serve the contents of http://localhost:7070/auth/{anything} on port 8080

What is actually happening?

Displaying 404 page (NotFound.vue) within vuepress + vue router

Other relevant information

  • Your OS: macOS 10.13.6
  • Node.js version: 8.11.3
  • Browser version: Chrome / v73
  • Is this a global or local install? local
  • Which package manager did you use for the install? npm and yarn (tried both)
  • Does this issue occur when all plugins are disabled? yes

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