Webpack4 Entrypoint undefined = index.html

use HtmlWebpackPlugin

const HtmlWebpackPlugin = require("html-webpack-plugin");
module.exports = {
    plugins: [new HtmlWebpackPlugin()]
};

Terminal gets a warning
Entrypoint undefined = index.html

// 
"webpack": "^4.12.0",
"html-webpack-plugin": "^3.2.0",

regardless of whether there are index.html files

under the dist folder.

I also have a problem with lz. I checked the answer of the author on issue,. You can solve this problem with html-webpack-plugin 3.0.7, but the author says that there will be a lot of other error, so I don't have a good idea.

https://github.com/jantimon/h.


module.exports add configuration stats: {children: false}
add package information (set to false to allow less lengthy output)
this does not output


I also encountered this problem and found compilation errors.
queried that the reason was that the html template was not filled. Although the compilation result was correct after filling in the template, it still prompted Entrypoint undefined = index.html
the issue895 of the project GitHub also mentioned this problem. According to the current feedback, this is a meaningless hint and does not affect the compilation result.

const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
    plugins: [new HtmlWebpackPlugin({
       template: './index.html'  // 
    })]
};

output directory is probably written wrong?
I made the same error before writing _ _ dirname


I used webpack4. My solution is output: {path:path.resolve (_ _ dirname,'dist') this resolve may have used join before I changed it to OK

Menu