Skip to content

Remove Sock injection when options.hot is false? #1831

Closed
@plauclair

Description

@plauclair
  • Operating System: macOS 10.14.4

  • Node Version: 10.15.0

  • NPM Version: 6.9.0

  • webpack Version: 4.30.0

  • webpack-dev-server Version: 3.3.1

  • This is a bug

  • This is a modification request

Code

const serverOptions = { hot: false };

Expected Behavior

When setting hot to false, socket is still added as a dependency. Maybe I understand wrong, but shouldn't dev server only serve when options.hot is false?

Actual Behavior

Current code always injects Socket dependency even if hot is disabled. Currently this can be achieved through options.inline = false but that seems to be something completely different.

https://github.com/webpack/webpack-dev-server/blob/master/lib/utils/addEntries.js#L21

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

We use dev server to serve files in an environment that does not support web sockets. Having the socks module crashes the process even when hot is false.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions