shellscape/koa-webpack

TypeError: webpack-hot-client: `entry` Object values must be an Array or Function.

shallinta opened this issue · 1 comments

I've got this error:

TypeError: webpack-hot-client: `entry` Object values must be an Array or Function. Please check your webpack config.
  • Node Version: v8.9.1
  • NPM Version: 5.5.1
  • koa Version: 2.5.2
  • koa-wepback Version: 5.1.0

My entry config is like:

entry: {
  home: 'src/pages/home/index.js',
  about: 'src/pages/about/index.js'
}

And I use koa-webpack like this:

KoaWebpack({
  compiler,
  hotClient: {
    allEntries: true
  }
}).then(...);

How should I resolve this?

Well, according to the error message you have to ensure that any object values are an array. If you're not sure how to do that, then I would recommend learning some basics before trying to use webpack.

You're also asking about an error from another project in this project. koa-webpack is not webpack-hot-client.

And you've also ignored the section in the issue template that states the issues here are not for support, which is what you're asking for. And you've removed several of the issue template sections.