-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Labels
Description
Describe the bug
For a svelte 5 component with runes disabled, onMount
is ignored when called inside the constructor of a class that's defined outside a svelte component and constructed inside the component during initialization, provided that this is the only onMount
callback registered.
Interestingly enough, this issue does not occur when using a function instead of a class constructor.
Reproduction
In the REPL above after the component has mounted "register onMount" is visible, but "mounted" is not.
Logs
No response
System Info
System:
OS: Windows 11 10.0.22631
CPU: (16) x64 12th Gen Intel(R) Core(TM) i7-1260P
Memory: 16.65 GB / 31.70 GB
Binaries:
Node: 18.16.0 - C:\Program Files\nodejs\node.EXE
npm: 9.5.1 - C:\Program Files\nodejs\npm.CMD
bun: 1.1.1 - ~\.bun\bin\bun.EXE
Browsers:
Edge: Chromium (127.0.2651.74)
Internet Explorer: 11.0.22621.3527
npmPackages:
svelte: ^5.1.0 => 5.1.0
Severity
annoyance