[英]Entrypoint undefined = index.html using HtmlWebpackPlugin
[英]The index html file is not being generated with HtmlWebpackPlugin in Linux
我有一个React项目,在构建项目时,此命令运行:
new HtmlWebpackPlugin({
inject: true,
template: 'public/index.html',
minify: {
removeComments: true,
collapseWhitespace: true,
removeRedundantAttributes: true,
useShortDoctype: true,
removeEmptyAttributes: true,
removeStyleLinkTypeAttributes: true,
keepClosingSlash: true,
minifyJS: true,
minifyCSS: true,
minifyURLs: true
},
filename: '/index.' + Date.now() + '.html'
}),
当我生成项目在Windows中,它会产生像指纹索引文件index.1514560078687.html
文件夹内build
与其他资产和文件一起。 但是,当我在Ubuntu中运行它时,它将生成除索引文件以外的所有文件。 即使我设置filename: '/index.html'
,也不会生成。
任何的想法?
看起来像HtmlWebpackPlugin
在您的根目录中存储index.html
文件。 你检查了吗?
尝试添加.
在/index.html
之前,它可能对您/index.html
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.