Skip to content

"lazy" mode does not seem to work in the latest webpack-dev-server #1323

@sergebat

Description

@sergebat
  • Operating System: Windows 10 (crosschecked on Ubuntu 17.10)
  • Node Version: 8.4.0
  • NPM Version: 5.6.0
  • webpack Version: 4.0.0 (first spotted on 3.x)
  • webpack-dev-server Version: 3.0.0 (first spotted on 2.x)
  • This is a bug
  • This is a modification request

Code

https://github.com/sergebat/test-webpack-lazymode

'use strict';

module.exports = {
  entry: './app.js',
  mode: "development",
  output: {
    filename: "bundle.js"
  },
  devServer: {
    lazy: true,
    inline: false,
    filename: "bundle.js"
  }
};

Expected Behavior

http://localhost:8080/bundle.js should return bundle in Lazy mode when loaded in browser.

Actual Behavior

Browser displays: "Cannot GET /bundle.js".

If lazy: true is removed, bundle.js returns fine.

I tried http://localhost:8080/dist/bundle.js, tried removing optional filename in devServer, tried removing inline: false. Neither of these options worked for me.

For Bugs; How can we reproduce the behavior?

Sync repo at https://github.com/sergebat/test-webpack-lazymode, then:

npx webpack-dev-server

and open bundle in browser.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions