Anyone knows why webpack 5 is showing 2 console logs. Please help
Asked
Active
Viewed 376 times
-2
-
Because it wants to notify you of two different things? Also, it's webpack-dev-server, not Webpack itself. – VLAZ Sep 15 '21 at 14:45
-
I checked multiple times it shows duplicate of the every log. Any solution to turn it for webpack-dev-server – PiSet music Sep 15 '21 at 20:11
1 Answers
0
PiSet - I had this same issue and it is annoying. to resolve it I added inject: false to my HTMLWebpackPlugin as found in this All my code runs twice when compiled by Webpack question.
plugins: [
new HtmlWebpackPlugin({
inject: false,
template: path.resolve(__dirname, "src", "index.html"),
}),
],

Dave B
- 1
- 1