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

Dynamic CSS injection #590

Open
chrisvxd opened this issue Aug 31, 2024 · 0 comments
Open

Dynamic CSS injection #590

chrisvxd opened this issue Aug 31, 2024 · 0 comments
Labels
ready Assumed ready enough to start type: feature type: performance

Comments

@chrisvxd
Copy link
Member

Currently, the user is responsible for importing the CSS. This means that Puck CSS commonly ends up in production CSS bundles for rendered pages, not just for pages containing Puck.

Instead, we should inject the CSS dynamically into the head when rendering the <Puck> component . This will prevent Puck CSS from ending up in the production CSS bundle.

Considerations

  • The CSS will likely have to be bundled before importing, which may require a custom build pipeline and dev mode
@chrisvxd chrisvxd added ready Assumed ready enough to start type: feature type: performance labels Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Assumed ready enough to start type: feature type: performance
Projects
None yet
Development

No branches or pull requests

1 participant