ESI Includes in Static Export #65234
aaronclong
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
ESI include tags can be treated as regular attributes and render correctly in the output. This would allow users to more easily add ESI includes based on their needs and control their configuration directly within the Next.js ecosystem.
Non-Goals
This doesn't wish to change how React handles this because it is part of the server/configuration of the app not the UI library.
Background
ESI includes are common way for a large website or organization to organize their individual subpages. These none HTML tags are used to load custom HTML, JavaScript, and whatever else to render a page correctly. Typically, these are resolved by CDNs and other web-proxy frontends. Here is the W3 Spec for this feature: https://www.w3.org/TR/esi-lang/
While it is possible to create the element in react, their attributes like
onerror
will not be rendered because despite React 16's changes anything withon
gets consumed by React.Proposal
In static builds, attributes could be prefix with with a value that on build completion Next.js removes.
Beta Was this translation helpful? Give feedback.
All reactions