Skip to content

Commit e21c49a

Browse files
misenhoweryyx990803
authored andcommitted
docs: fix issues with prefetch override docs (vuejs#2010) [ci skip]
1 parent 5838096 commit e21c49a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/guide/html-and-static-assets.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ module.exports = {
5151
// or:
5252
// modify its options:
5353
config.plugin('prefetch').tap(options => {
54-
options.fileBlackList.push([/myasyncRoute(.)+?\.js$/])
54+
options[0].fileBlacklist = options[0].fileBlacklist || []
55+
options[0].fileBlacklist.push([/myasyncRoute(.)+?\.js$/])
5556
return options
5657
})
5758
}

docs/zh/guide/html-and-static-assets.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ module.exports = {
5151
// 或者
5252
// 修改它的选项:
5353
config.plugin('prefetch').tap(options => {
54-
options.fileBlackList.push([/myasyncRoute(.)+?\.js$/])
54+
options[0].fileBlacklist = options[0].fileBlacklist || []
55+
options[0].fileBlacklist.push([/myasyncRoute(.)+?\.js$/])
5556
return options
5657
})
5758
}

0 commit comments

Comments
 (0)