Next.js Discord

Discord Forum

How to preload javascript chunks created after build in Nextjs?

Unanswered
Spectacled Caiman posted this in #help-forum
Open in Discord
Spectacled CaimanOP
The JS chunks created by webpack after build have a low priority and as result get downloaded late resulting in slowing down the website. I want these scripts to be loaded with high-priority, and I believe this can be done if these scripts are added with the preload attribute in the tag. I just can't seem to figure out how to do this.

0 Replies