Skip to content

Commit 7ec20aa

Browse files
committed
feat: 如果存在同名 html 模板文件, 全局 template 配置非必须
1 parent 70bcae1 commit 7ec20aa

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

lib/client.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,10 @@ class WebpackClientBuilder extends WebpackBaseBuilder {
9696
config.entry = Object.assign(config.entry, { include: null, exclude: null }, config.entry.html);
9797
}
9898
}
99-
globalTemplate = this.utils.normalizePath(globalTemplate, config.baseDir);
99+
// 如果存在同名 html 模板文件, 全局 template 配置非必须
100+
globalTemplate = globalTemplate && this.utils.normalizePath(globalTemplate, config.baseDir);
101+
100102
const entry = this.utils.getEntry(config, this.type);
101-
const extMath = this.config.entry.extMatch || '.js';
102103

103104
let deps;
104105
if (this.config.dll) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "easywebpack",
3-
"version": "4.5.2",
3+
"version": "4.6.0-beta.1",
44
"description": "基于 Webpack 的前端构建工程化解决方案",
55
"keywords": [
66
"webpack",

0 commit comments

Comments
 (0)