html-webpack-plugin 報錯 Entrypoint undefined = index.html
var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
? ? entry: {
? ? ? ? main: "./src/scripts/index.js",
? ? },?
? ? output: {
? ? ? ? path: path.resolve(__dirname, "./dist/js"),
? ? ? ? filename: '[name]-[chunkhash].js',
? ? },
????plugins: [
? ? ? new HtmlWebpackPlugin()
? ? ]
}
請看命令
2020-01-02
2019-08-23
我也遇到了這個報錯。
后來發現自己是package.json里邊script配置寫錯了,我寫成 "build":"webpack webpack.config.js"
后來改成 webpack --config webpack.config.js就沒有這個錯誤了。
2019-01-22
然后呢?就沒有下文了?沒人解決嗎
2019-01-16
webpack 4升級后版本引起的問題
2018-08-19
沒有index.html頁面,你需要建一個index.html頁面,插件是以index.html為模板,來生成html文件的