Skip to content

Content base should have precedence over proxy #1132

Closed
@jacobp100

Description

@jacobp100
  • Operating System: Windows 10
  • Node Version: 8.5
  • NPM Version: 5
  • webpack Version: 3.1
  • webpack-dev-server Version: 2.9.1
  • This is a bug
  • This is a feature request
  • This is a modification request

Code

  // webpack.config.js
{
  contentBase: path.join(process.cwd(), "public"),
  proxy: {
    "/": {
      target: <ourQaServer>
    },
  }
}

Expected Behavior

Content base has priority

Actual Behavior

Proxy has priority

For Bugs; How can we reproduce the behavior?

  • Have file with filename public/style.css
  • Access /style.css
  • It will try (and) fail to get this from the proxy

For Features; What is the motivation and/or use-case for the feature?

This is confusing behaviour.

This is a repost of #1131. I'm happy to submit a PR if you're happy to change this.

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