diff --git a/docs/guide/html-and-static-assets.md b/docs/guide/html-and-static-assets.md index b085a4cd96..00ed7c4596 100644 --- a/docs/guide/html-and-static-assets.md +++ b/docs/guide/html-and-static-assets.md @@ -51,7 +51,8 @@ module.exports = { // or: // modify its options: config.plugin('prefetch').tap(options => { - options.fileBlackList.push([/myasyncRoute(.)+?\.js$/]) + options[0].fileBlacklist = options[0].fileBlacklist || [] + options[0].fileBlacklist.push([/myasyncRoute(.)+?\.js$/]) return options }) } diff --git a/docs/zh/guide/html-and-static-assets.md b/docs/zh/guide/html-and-static-assets.md index 91e6dd0e40..23ded4a21d 100644 --- a/docs/zh/guide/html-and-static-assets.md +++ b/docs/zh/guide/html-and-static-assets.md @@ -51,7 +51,8 @@ module.exports = { // 或者 // 修改它的选项: config.plugin('prefetch').tap(options => { - options.fileBlackList.push([/myasyncRoute(.)+?\.js$/]) + options[0].fileBlacklist = options[0].fileBlacklist || [] + options[0].fileBlacklist.push([/myasyncRoute(.)+?\.js$/]) return options }) }