![](/img/trans.png)
[英]Entrypoint undefined = index.html using HtmlWebpackPlugin
[英]Entrypoint undefined = ./index.html
嗨,我是webpack的一名相当新的程序员,我正在尝试使用webpack创建react应用。 但我收到此错误。
Child html-webpack-plugin for "index.html":
1 asset
Entrypoint undefined = ./index.html
[![const HtmlWebPackPlugin = require("html-webpack-plugin");
const path = require('path')
const htmlPlugin = new HtmlWebPackPlugin({
template: "./src/index.html",
filename: "./index.html"
});
module.exports = {
entry: "index.js",
output: {
path: path.resolve('dist'),
filename: 'bundle.js'
},
module: {
rules: \[
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
options: {
"presets": \["env", "react"\]
}
}
}
\]
},
plugins: \[htmlPlugin\],
devServer: {
contentBase: './dist',
hot: true
}
};
也许filename: "./index.html"
filename: "index.html"
应该是filename: "index.html"
? 或者只是删除它
似乎此错误消息是无害的,可以忽略: html-webpack-plugin问题#895
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.