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

Support the chunkName method #1010

Open
yanghuabei opened this issue Jul 9, 2024 · 0 comments
Open

Support the chunkName method #1010

yanghuabei opened this issue Jul 9, 2024 · 0 comments

Comments

@yanghuabei
Copy link

🚀 Feature Proposal

Add chunkName method to loadable component.

Motivation

Our page uses server-side rendering, and some loadable features need to be displayed immediately after the page loads. We hope to obtain the chunkName during server-side rendering and then preload resources.

Example

// server side
import { LoadablePopup } from './loadable'

const chunkName = LoadablePopup.chunkName();
const resources = collectResources(chunkName);
// Then insert link preload after body tag

Pitch

Why does this feature belong in the Loadable Component ecosystem?

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

1 participant