未验证 提交 879c9be3 编写于 作者: W w_563 提交者: GitHub

fix(h5): wrong version check for copyWebpackPlugin

上级 e497e5a0
......@@ -30,7 +30,7 @@ function getIndexCssPath (assetsDir, template, hashKey) {
try {
const templateContent = fs.readFileSync(getTemplatePath(template))
if (new RegExp('\\b' + hashKey + '\\b').test(templateContent)) {
return path.join(assetsDir, `[name].${VUE_APP_INDEX_CSS_HASH}${CopyWebpackPluginVersion > 5 ? '' : '.'}[ext]`)
return path.join(assetsDir, `[name].${VUE_APP_INDEX_CSS_HASH}${CopyWebpackPluginVersion > 7 ? '' : '.'}[ext]`)
}
} catch (e) { }
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册