Webpack 5 won't allow a non-string entry configuration value #18057
-
I am trying to set up a Webpack (version 5) configuration that specifies multiple entry points using the "Object Syntax" as described in the Webpack documentation at https://webpack.js.org/concepts/entry-points/#object-syntax. According to the Webpack documentation, I should be able to specify an "entry" configuration as (for example):
But when I try to run Webpack with this configuration, I get an error:
My full webpack.config.js is as follows:
and my package.json is as follows:
Can anyone suggest what I may be missing here? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Wierd, I can't reproduce, can you run |
Beta Was this translation helpful? Give feedback.
Please use
"build": "webpack",
instead"build": "webpack .",
, there is no.
Also please use
filename: '[name].bundle.js',
, because you have multiple chunk and can't use the same nameAnd please use:
By default HtmlWebpackPlugin generates
index.html