You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
onMount calls in Rollup just flat out disappear, and unfortunately I can't do the $$self.$$.on_mount.push workaround as you're not allowed to use $$self.
Reproduction
Unfortunately, I can't reproduce this in the REPL (my exact same component code works!)
Presumably, however you're bundling this, you're getting the server-side rendering versions of the svelte exports, where onMount is a no-op and gets tree shaken out, instead of the browser versions. We'd need to seem a minimal reproduction, including your build process.
You need to pass browser: true to the node-resolve plugin, or it will try to use the server-side versions of any imports. See the example config in the readme of the Svelte Rollup plugin that you're using - https://github.com/sveltejs/rollup-plugin-svelte
Describe the bug
onMount calls in Rollup just flat out disappear, and unfortunately I can't do the
$$self.$$.on_mount.push
workaround as you're not allowed to use$$self
.Reproduction
Unfortunately, I can't reproduce this in the REPL (my exact same component code works!)
rollup.config.mjs
Component Code
Output
Logs
System Info
Severity
blocking all usage of svelte
The text was updated successfully, but these errors were encountered: