From ccdf3a7ad40444f2530e8e9f180e29c11c529547 Mon Sep 17 00:00:00 2001 From: paoloricciuti Date: Mon, 19 May 2025 11:32:11 +0200 Subject: [PATCH] fix: `@attach` opt's you into runes mode --- .changeset/famous-rocks-poke.md | 5 +++++ .../docs/03-template-syntax/09-@attach.md | 3 +++ .../docs/99-legacy/00-legacy-overview.md | 2 +- .../src/compiler/phases/2-analyze/index.js | 18 +++++++++++++++++- 4 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 .changeset/famous-rocks-poke.md diff --git a/.changeset/famous-rocks-poke.md b/.changeset/famous-rocks-poke.md new file mode 100644 index 0000000000..a3fc4aedc7 --- /dev/null +++ b/.changeset/famous-rocks-poke.md @@ -0,0 +1,5 @@ +--- +'svelte': patch +--- + +fix: `@attach` opt's you into runes mode diff --git a/documentation/docs/03-template-syntax/09-@attach.md b/documentation/docs/03-template-syntax/09-@attach.md index 2df0882e34..a3832b6553 100644 --- a/documentation/docs/03-template-syntax/09-@attach.md +++ b/documentation/docs/03-template-syntax/09-@attach.md @@ -7,6 +7,9 @@ Attachments are functions that run when an element is mounted to the DOM. Option > [!NOTE] > Attachments are available in Svelte 5.29 and newer. +> [!NOTE] +> Attachments also opt you in for runes mode so if you use them in a legacy component you would have to also migrate that component. + ```svelte