Skip to content

Webpack 5 won't allow a non-string entry configuration value #18057

Answered by alexander-akait
ethanov asked this question in Q&A
Discussion options

You must be logged in to vote

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 name

And please use:

new HtmlWebpackPlugin({
      template: path.join(__dirname, 'public', 'index1.html'),
      filename: "index1.html",
      chunks: ['chunkone']
    }),
     new HtmlWebpackPlugin({
      template: path.join(__dirname, 'public', 'index2.html'),
      filename: "index2.html",
      chunks: ['chunktwo']
    })

By default HtmlWebpackPlugin generates index.html

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@ethanov
Comment options

@alexander-akait
Comment options

@ethanov
Comment options

@alexander-akait
Comment options

Answer selected by ethanov
@ethanov
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants