Skip to content

Prefetch links presents in html even if prefetch plugin deleted #2616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
KleinMaximus opened this issue Sep 26, 2018 · 7 comments
Closed

Prefetch links presents in html even if prefetch plugin deleted #2616

KleinMaximus opened this issue Sep 26, 2018 · 7 comments

Comments

@KleinMaximus
Copy link

KleinMaximus commented Sep 26, 2018

Version

3.0.4

Node and OS info

Node 10.10.0 / yarn 1.9.4

Steps to reproduce

// Resulting VUE config
module.exports = {
  chainWebpack: (config) => {
    config.plugins.delete('prefetch');
  },
};

What is expected?

No any <link rel="prefetch" href="/js/XXX.js"> of async components in html head section.

What is actually happening?

Tags <link rel="prefetch" href="/js/XXX.js"> present in head.

Notes

This code disappears from the configuration (vue inspect):

new PreloadPlugin({
  rel: 'prefetch',
  include: 'asyncChunks'
}),

The strange thing is that even in the absence of a plugin in vue inspect, <link> tags still appear in html.

@KleinMaximus
Copy link
Author

In issue #979 described the config I applied the method to disable prefetch, but it didn't work.

@KleinMaximus
Copy link
Author

I found my mistake. I used the third-party package features incorrectly.

@yangning10000
Copy link

may I ask which third-party package features did you use incorrectly? I am currently facing the same issue

@KleinMaximus
Copy link
Author

may I ask which third-party package features did you use incorrectly? I am currently facing the same issue

I don't think I remember.

@yangning10000
Copy link

did you use server side rendering for you project?

@KleinMaximus
Copy link
Author

@yangning10000, if this question to me, then Yes

@yangning10000
Copy link

@KleinMaximus yeah I use vue-cli-plugin-ssr. in createBundleRenderer, there seems to be a inject: false which suppose to control the behavior but nothing works. I'm so confused right now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants