[英]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.