webpack: configuration.entry error (passing an Array of paths)
I’m submitting a bug report
passing an Array of paths causes a webpack validation error
Webpack version: 2.1.0-beta.25
Please tell us about your environment: macOS Sierra
Current behavior:
passing an Array of paths outputs a WebpackOptionsValidationError
entry: [
'webpack/hot/dev-server',
`webpack-dev-server/client?http://127.0.0.1:${port}`,
'./src/js/script.js',
'./src/css/style.css',
'./src/index.html'
],
configuration.entry should be one of these:
object { <key>: string | [string] } | string | [string]
Expected/desired behavior:
passing an Array of strings should work? ([string])
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 3
- Comments: 28 (9 by maintainers)
@jlabaj Alright, the issue is reproducible with your repo (for me). As @duivvv and @EvNaverniouk pointed out, the problem seems this string
'webpack/hot/dev-server'
. If you remove it from the list this issue does not occur.So I thought, maybe webpack tries to add
'webpack/hot/dev-server'
to the entry points again because you specified--hot
(as described in Docs and this GitHub-Issue) and this causes some broken config array. But even without this parameter the same error message occurs.Maybe @gajus can help us?
I get duplicate entries in the array. And so, webpack-dev-server is failing.
Issue was closed because of inactivity.
If you think this is still a valid issue, please file a new issue with additional information.
Looking into it.
Hello,
Any news on this issue?
Reproducing with: webpack 2.2.1 webpack-dev-server 2.3.0
Cheers Jerome
Hi,
I’m having this issue with múltiple entry points and without dev server, in a production build.
With just one entry points It works fine.