Skip to content

Conversation

garamond
Copy link
Contributor

@garamond garamond commented Sep 8, 2025

When using svelte-preprocess-react with Svelte >5.36.7 the build fails during prerendering.

sveltejs/svelte#16428 which is part of Svelte 5.36.8 causes the build to fail with the error:

[500] GET /
TypeError: html2.substring is not a function

Because of this the Svelte dependency in our project can no longer be upgraded.

This change adds support for arrays in functions handling $$payload. I don't know if this is the right way to address the underlying issue.

@bfanger
Copy link
Owner

bfanger commented Sep 14, 2025

Fixed in 2.1.4, Thanks for reporting the issue and providing the PR.

@bfanger bfanger closed this Sep 14, 2025
@webJose
Copy link

webJose commented Sep 14, 2025

Tip: Breaking changes should be rolled out as new major versions. Version 2.1.4 will most likely be pulled by projects that use strings, because it satisfies the Semver convention that NPM follows.

v2.1.4 should have been v3.0.0.

@bfanger
Copy link
Owner

bfanger commented Sep 14, 2025

@webJose Only for project that follow semver ;)

The peerDependencies are set for 2.1.4, so updating would result in:

 WARN  Issues with peer dependencies found
.
└─┬ svelte-preprocess-react 2.1.4
  └── ✕ unmet peer svelte@>=5.36.8: found 5.34.0

Besides the issue was introduced in a patch version of svelte as well, so projects that where affected are now fixed too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants