Skip to content

Very large ESI are truncated #20

@julienlary-dkt

Description

@julienlary-dkt

Hello,

First thanks for you work and in particular this implementation of ESI with React (and Next.js in my case).

I am currently facing an issue with contents that have very large size (about 2mb), generated HTML from ESI is missing some ending tags.
I have a Content component that is used to create the HOC (ContentESI). This component calls an API to get its data in getInitialProps. The return of API is complete, the props in window.__REACT_ESI__ are complete. Content component is using many others components to render parts of the API response.
When I render Content without ESI, generated HTML is complete. But when I use the HOC, generated HTML is missing data at the end (so in my case, closing tags).

My knowledge in Node.js & React are very limited, I don't know where to start. I think that it is an issue with Stream, Transform or renderToNodeStream (based on my reading of server.tsx).

I have done tests with:

  • Node.JS 12.x, React 16.x, Next.js 9.5, React ESI 0.3
  • Node.JS 12.x, React 17.x, Next.js 9.5, React ESI 0.3
  • Node.JS 14.x, React 16.x, Next.js 9.5, React ESI 0.3
  • Node.JS 12.x, React 17.x, Next.js 9.5, React ESI 0.3
  • Node.JS 12.x, React 16.x, Next.js 9.5, React ESI 0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions