Skip to content

Svelte 5: $inspect not firing when $effect does #11586

@Hugos68

Description

@Hugos68

Describe the bug

$inspect unexpectedly does not fire when $effect with the same dep does.

Reproduction

Here is a repo for reproduction: https://github.com/Hugos68/svelte-131-inspect-bug
Steps are inside the README

What's peculiar is that it fires as expected in the online REPL

Logs

Browser logs Chromium (123.0.2420.97)

[vite] connecting...
client.ts:175 [vite] connected.
useRole.svelte.js:5 effect open: false
useRole.svelte.js:5 effect open: true

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (12) x64 AMD Ryzen 5 5600 6-Core Processor
    Memory: 22.57 GB / 31.93 GB
  Binaries:
    Node: 20.11.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.1.0 - ~\AppData\Local\pnpm\pnpm.CMD
  Browsers:
    Edge: Chromium (123.0.2420.97)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    svelte: ^5.0.0-next.1 => 5.0.0-next.131

Severity

annoyance

Metadata

Metadata

Assignees

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