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

New hook onRenderHtmlEnd() #1979

Open
brillout opened this issue Nov 22, 2024 · 0 comments
Open

New hook onRenderHtmlEnd() #1979

brillout opened this issue Nov 22, 2024 · 0 comments
Labels
enhancement ✨ New feature or request

Comments

@brillout
Copy link
Member

brillout commented Nov 22, 2024

Description

Called after the HTML is fully generated (after Vike injects assets).

Use case: HTML transformers, such as critical CSS inlining #1975.

Workaround in the meantime:

  • SSG: crawl HTML files in dist/client/ and apply transformer against each HTML file.
  • SSR: run transformer after renderPage().

(Note to maintainers: ideally the name should be swapped with the already existing onAfterRenderHtml().)

@brillout brillout added the enhancement ✨ New feature or request label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant