Skip to content

Commit 3432cbc

Browse files
committed
Do not build modules in index page
1 parent 9378841 commit 3432cbc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

middleware.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ module.exports = function (compiler, option) {
2121
return function*(next) {
2222
var ctx = this;
2323
var req = this.req;
24-
var isHTML = /\.html?$/.test(this.url.split('?')[0]);
24+
var url = this.url;
25+
if (url === '/') {
26+
return yield next;
27+
}
28+
var isHTML = /\.html?$/.test(url.split('?')[0]);
2529
var runNext = yield middleware(doIt, req, {
2630
end: function (content) {
2731
// 添加 html fix

0 commit comments

Comments
 (0)