Skip to content

Can't apply devClient to configuration.entry options when entry was a function #801

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
HairyRabbit opened this issue Feb 21, 2017 · 0 comments · Fixed by #802
Closed

Can't apply devClient to configuration.entry options when entry was a function #801

HairyRabbit opened this issue Feb 21, 2017 · 0 comments · Fixed by #802

Comments

@HairyRabbit
Copy link
Contributor

Hi, I use dynamic entry for my webpackConfig:

// webpack.config.js
module.exports = {
  entry: () => {
    return { app: 'index.js' }
  }
  //...
}

when I use webpack-dev-server start app, It's tell me configuration.entry does not match the schema:

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.entry should be one of these:
   object { <key>: non-empty string | [non-empty string] } | non-empty string | [non-empty string] | function
   The entry point(s) of the compilation.
   Details:
    * configuration.entry should be an object.
    * configuration.entry should be a string.
    * configuration.entry[2] should be a string.
    * configuration.entry should be an instance of function
      function returning an entry object or a promise..

I think it maybe not works with the function type entry point. ./lib/util/addDevServerEntrypoints.js#L20

Anything help ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant