Skip to content
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

Add shouldPrefetch() in vue-server-renderer #5964

Closed
laugharn opened this issue Jun 24, 2017 · 2 comments
Closed

Add shouldPrefetch() in vue-server-renderer #5964

laugharn opened this issue Jun 24, 2017 · 2 comments

Comments

@laugharn
Copy link

What problem does this feature solve?

When using Vue to create a static site (like via nuxt generate) every code split asset is getting prefetched. This is an awesome feature if we were thinking about offline mode, but when you're trying to create a site with triple digit routes and little concern for offline browsing (i.e. a marketing site) this is creating some pretty beefy code overhead.

It would be great if there was a way to get a shouldPrefetch in vue-server-renderer, similar to shouldPreload.

What does the proposed API look like?

Exactly like shouldPreload(), but for prefetching would be great.

@FranckFreiburger
Copy link

I agree with @laugharn prefetch resources should be controllable.
In my case, I would like to avoid some big scripts (like PDF.js + PDF.js worker) to be downloaded too early.

@laugharn
Copy link
Author

laugharn commented Oct 6, 2017

🎉 this is great, thanks @yyx990803

ztlevi pushed a commit to ztlevi/vue that referenced this issue Feb 14, 2018
f2009 pushed a commit to f2009/vue that referenced this issue Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants