Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Clean up dev-server options #1175

Merged
merged 1 commit into from
Oct 15, 2018
Merged

Clean up dev-server options #1175

merged 1 commit into from
Oct 15, 2018

Commits on Oct 14, 2018

  1. Clean up dev-server options

    * (BREAKING) Stops setting `host` / `public`, since they are only needed
      in a minority of use-cases (such as running inside a Docker container
      or having a proxy in front of webpack-dev-server), and the current
      implementation for them in `@neutrinojs/dev-server` is buggy.
    * (BREAKING) Stops supporting the `@neutrinojs/web` shorthand of setting
      `devServer.proxy` to a string, since it could only be used if the
      options it set were exactly what were required - which was often not
      the case given that proxy configuration is very project-specific.
    * Stops setting a `host` header on *responses* to the client, since
      it makes no sense (particularly it was set to the public host).
      It's possible that this was set thinking they would be set for
      *requests* to a proxy target, but that's not the case (and for that,
      `changeOrigin: true` would be more appropriate anyway).
    * Changes `output.publicPath` from `'./'` to `''` since the latter is
      equivalent (and is also the webpack default), however it correctly
      allows webpack-dev-server to fall back to `'/'` when needed:
      https://github.com/webpack/webpack-dev-server/blob/v3.1.9/lib/Server.js#L176
    * Stops setting `devServer.publicPath` explicitly since it inherits from
      `output.publicPath` so should not normally need to be overridden:
      https://github.com/webpack/webpack-dev-server/blob/v3.1.9/bin/webpack-dev-server.js#L142-L152
    * Stops setting `https: false`, since that's the default.
    
    Fixes #1169.
    edmorley committed Oct 14, 2018
    Configuration menu
    Copy the full SHA
    a5e03f0 View commit details
    Browse the repository at this point in the history