question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document how to disable/customize the prefetch plugin

See original GitHub issue

What problem does this feature solve?

When I use the asyn load of vue-router, the webpack-plugin prefetch makes all asyn modules preload. This results in the inability to load on demand

What does the proposed API look like?

vue.conf.js

{
  prefetch: {}
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:8
  • Comments:24 (7 by maintainers)

github_iconTop GitHub Comments

36reactions
LinusBorgcommented, Dec 19, 2019

Thanks @Dealerpriest, that was very helpful.

This can be custimzed with webpack-chain today like this:

// vue.config.js
chainWebpack: (config) => {

  // A, remove the plugin
  config.plugins.delete('prefetch')
  
  // or:
  // B. Alter settings:
  config.plugin('prefetch').tap(options => {
    if (!options[0].fileBlacklist) options[0].fileBlacklist = []
    options[0].fileBlacklist.push(/myasyncRoute(.)+?\.js$/)
    return options
  })
}

Relevant source: https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-service/lib/config/app.js#L20-L25

We can discuss wether or not it makes sense to expose this as a config value in vue.config.js

30reactions
wangxiangyaocommented, Mar 13, 2018

我需要使用webpack-chain,来重新配置Prefetch,对么?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to disable Prefetch and SuperFetch or SysMain - YouTube
You must have been thinking of Prefetch and SuperFetch whether to disable them completely or not to avoid deleting their files occasionally.
Read more >
CommandBars.DisableCustomize property (Office)
expression A variable that represents a CommandBars object. Example. The following example switches the DisableCustomize property on or off. VB
Read more >
Crystal - ThemeXpert
Crystal is a business based WordPress theme with a stunning layout that is able to catch its visitor's attention at first sight.
Read more >
Diff - d60317bbda..eead273f0c - chromium/src - Git at Google
<activity android:name="org.chromium.chrome.browser.document. ... isBlockedByPolicy_( @@ -670,8 +673,9 @@ * @private */ disableConfigure_: ...
Read more >
Executive Report - Joe Sandbox
EXE' SCODEF:4628 CREDAT:17410 /prefetch:2. Imagebase: 0x1250000 ... Joe Sandbox IDA Plugin ... Failed to get @DisableModify., xrefs: 001CFDB8.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found