Skip to content
This repository was archived by the owner on Jan 21, 2021. It is now read-only.
This repository was archived by the owner on Jan 21, 2021. It is now read-only.

Chrome Warning message regarding not using preloaded chunks #8

Closed
@stevenfitzpatrick

Description

@stevenfitzpatrick

Just trying out this plugin for two chunks generated by webpack code splitting, everything seems to working fine but in console I am getting these warnings.

The resource http://localhost:8080/98196ebdaabca2c98261.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it wasn't preloaded for nothing.

Now the error makes sense, but it could take the user a few seconds to navigate to the route which requires these chunks. Is there anyway to stop this error message ?

I.e I preload these code-splitting chunks as follows

<link rel="preload" href="98196ebdaabca2c98261.js" as="script">
<link rel="preload" href="0f4f2b938549bee12ab7.js" as="script">

but they are not loaded on "home" route, only when the user navigates to i.e. "favourites"

Edit : I guess I should be using prefetch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions