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.

Prevent preloading a chunk even if it is used on the server

See original GitHub issue

💬 Questions and Help

I have a ssr enabled site and am trying to use progressive hydration on the client side, but since the component is rendered on the server side, ChunkExtractor reports the chunk in getScriptTags and getLinkTags . I want to load the corresponding chunks for a component only when it is about to get hydrated (i.e. enter the viewport) . Is there a way where I can tell loadable to exclude a chunk from being reported as being used ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
markwoodward23commented, Jul 15, 2020

@xtroncode I’ve actually done actually that in a company project - I’ll see if I can extract it into something more open. Essentially we use loadable for the common things like vendor bundles etc, then anything which is dynamic we use a standard dynamic import, or a require when we’re on the server. That generates the dynamic bundles with webpack, requires the module as normal when SSR, and you can lazy hydrate those bundles in on intersection on the client. SEO + performance wins all round.

Will link to something in the next few days, remind me if not.

0reactions
stale[bot]commented, Sep 14, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

quick question - is pre loading chunks good for the server?
No-one has to be in the server, its even better to leave it alone since the server will only focus on chunks instead...
Read more >
How To Pre-Generate Your World on A Minecraft ... - YouTube
If you want to know how to pre-generate chunks on a Minecraft server in order to stop lag, this is the video for...
Read more >
Preloading chunks? | SpigotMC - High Performance Minecraft
Is there any way to prevent bad server performance caused by players loading a lot of chunks at once? Should you use a...
Read more >
Preload critical assets to improve loading speed - web.dev
Because browsers don't execute preloaded files, preloading is useful to separate fetching from execution which can improve metrics such as Time ...
Read more >
Link types: preload - HTML: HyperText Markup Language | MDN
The basics · Prioritize resource loading more accurately. · Store in the cache for future requests, reusing the resource if appropriate. · Apply ......
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