Skip to content

example for api/simple can't compile successfully  #1428

@404157386

Description

@404157386
  • Operating System: Windows 10
  • Node Version: v7.10.1
  • NPM Version: 4.2.0
  • webpack Version: ^4.1.1
  • webpack-dev-server Version: 3.1.4
  • This is a bug
  • This is a modification request

Code

  // webpack.config.js

https://github.com/webpack/webpack-dev-server/blob/master/examples/api/simple/webpack.config.js

  module.exports = setup({
  context: __dirname,
  entry: ['./app.js', '../../../client/index.js?http://localhost:8080/'],
  output: {
    filename: 'bundle.js'
  }
});

Expected Behavior

Compiled successfully and server starts up.

Actual Behavior

hit error:

ERROR in multi ./app.js ../../../client?http://localhost:8080/
Module not found: Error: Can't resolve '../../../client/index.js?http://localhost:8080/' in 'C:\Users\kaiwen\webpack-dev-server-example\examples\api\simple'
@ multi ./app.js ../../../client?http://localhost:8080/

I can't find './../../client/index.js' at the code.
Is it deleted or renamed after an upgrade?

The server can run successfully, if remove this path:
entry: ['./app.js'],

Should the cli file is included?

For Bugs; How can we reproduce the behavior?

run node server.js at path examples\api\simple

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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions