Skip to content

Static SSR (async) inserting hyrdation script when using lazy and Suspense #1931

@Enideo

Description

@Enideo

Describe the bug

When using renderToStringAsync() with lazy and <Suspense>, since version 1.8.x a <script> tag is injected at the end of the html string which looks like it's for hydration. hydratable is not set to true in babel config and this is a change since 1.7.12.

Your Example Website or App

https://stackblitz.com/edit/solid-nollup-epm7fs?file=package.json

Steps to Reproduce the Bug or Issue

  1. from the stackblitz link, run npm run start (should happen automatically)
  2. the console should log the html string, containing a script tag
  3. to see how it used to be: change package.json version for solid-js "^1.712" to "1.7.12" and save.
  4. then run npm install && npm run start
  5. the console should log a html string without a script tag

Expected behavior

I do not expect any <script> to be inserted into the html for hydration, just static html rendered from the Solid JSX components.

Screenshots or Videos

No response

Platform

  • OS: Linux
  • Browser: N/A: node
  • Version: 18.18.2

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions