Open vipero07 opened 8 months ago
Im seeing this also.
<script>
import {onMount,beforeUpdate,afterUpdate} from 'svelte';
beforeUpdate(() => {
console.log("beforeupdate")
});
afterUpdate(() => {
console.log("afterupdate")
});
onMount(() => {
console.log("onmount")
});
</script>
<div>test</div>
Describe the bug
When making a custom element the following lifecycles never appear to run:
onMount
afterUpdate
beforeUpdate
I haven't tried others.
Reproduction
Pull down this repo, run
pnpm dev
note how the images show up. Now update the svelte version to 4.2.2 (this hasn't worked since 4.0.0 though), fix thepanorama.svelte
file to usecustomElement
instead oftag
and runpnpm dev
. Note how the images don't load. Upon inspection of the generated bundle stats from the rollup visualizer I can see it is missing any references to the methods used inside of the onMount method. I tried just putting console.log inside theonMount
method and see no logs.Logs
No response
System Info
Severity
blocking an upgrade