Skip to content

Svelte 5: #each block behaving differently with pnpm dev vs pnpm build #10473

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

Closed
svelte-kit-so-good opened this issue Feb 14, 2024 · 0 comments · Fixed by #10500
Closed

Svelte 5: #each block behaving differently with pnpm dev vs pnpm build #10473

svelte-kit-so-good opened this issue Feb 14, 2024 · 0 comments · Fixed by #10500
Assignees

Comments

@svelte-kit-so-good
Copy link

Describe the bug

In the +layout.svelte of the repro there are 4 variants.

  • Version 1 insidiously breaks on deployment (as discussed in this closed issue 10437).
  • Version 2 is the now prescribed way (?) ... which is unnecessary when using writable stores
  • Version 3 actually breaks on pnpm dev 🤷‍♀️
  • Version 4 just works; I've moved all the logic to a component and imported it.

Note: the repro starts with Version 3. If you run pnpm build && pnpm preview the demo works (works means the modal loads properly when clicking the options in the '/iframes' route). If you run pnpm dev the demo breaks.

Reproduction

SvelteLab demo

Logs

No response

System Info

Svelte v5.0.0-next.53; but tried as far back as alpha 20.

Severity

annoyance

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 a pull request may close this issue.

2 participants