html-webpack-plugin 報(bào)錯(cuò) 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()
? ? ]
}
請(qǐng)看命令
2020-01-02
//?增加stats的配置就可以了 module.exports?=?{ ??//?其他配置 ?? ??stats:?{ ????children:?false ??} }2019-08-23
我也遇到了這個(gè)報(bào)錯(cuò)。
后來發(fā)現(xiàn)自己是package.json里邊script配置寫錯(cuò)了,我寫成 "build":"webpack webpack.config.js"
后來改成 webpack --config webpack.config.js就沒有這個(gè)錯(cuò)誤了。
2019-01-22
然后呢?就沒有下文了?沒人解決嗎
2019-01-16
webpack 4升級(jí)后版本引起的問題
2018-08-19
沒有index.html頁(yè)面,你需要建一個(gè)index.html頁(yè)面,插件是以index.html為模板,來生成html文件的