Skip to content

Bug with bindings across compilation units #6530

@hgiesel

Description

@hgiesel

Describe the bug

Following scenario: we provide a base app (App.svelte), and some components for users to use (Component.svelte).

The users are supposed to provide their own add-on components (AddOn.svelte), which can use our components, and then add them to the base app through an interface app.addComponent(myaddon). The add-ons are then inserted using <svelte:element bind:this={myaddon} />

When using those provided components inside the add-on, we can set properties, but we cannot bind to them.

Reproduction

https://github.com/hgiesel/svelte-bug-example

Logs

No response

System Info

System:
    OS: macOS 11.2.3
    CPU: (8) x64 Intel(R) Core(TM) i7-1060NG7 CPU @ 1.20GHz
    Memory: 423.93 MB / 8.00 GB
    Shell: 5.1.4 - /usr/local/bin/bash
  Binaries:
    Node: 16.0.0 - /usr/local/bin/node
    Yarn: 1.22.5 - ~/.yarn/bin/yarn
    npm: 7.10.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 91.0.4472.114
    Firefox: 89.0.2
    Safari: 14.0.3
  npmPackages:
    svelte: ^3.38.3 => 3.38.3

Severity

blocking all usage of svelte

Metadata

Metadata

Assignees

No one assigned

    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