unstale

npm / svelte

svelte

What changed in svelte 4 to 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

117 breaking16 security15 deprecations28 new APIs and options22 performance21 behavior and defaults8 tooling335 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

svelte 5500 changes

Breaking changes 80

  • Using let: directives on a component with a children snippet now errors.

    5.57.2release notes

  • Calling setContext after an await during SSR throws set_context_after_init.

    5.57.1release notes

  • Declaration tags and {@const} are blocked on async values read inside closures.

    5.57.0release notes

  • This error is now reported for export let x = $derived(...) in runes mode.

    5.57.0release notes

  • Duplicate snippet or declaration tag definitions now produce a compile-time error.

    5.56.1release notes

  • The async blocking strategy is replaced with merging.

    5.55.6release notes

  • The introstart event is no longer dispatched for an animation of the animate directive.

    5.55.5release notes

  • The idPrefix option no longer accepts --.

    5.55.2release notes

  • The error is now emitted in production.

    5.50.0release notes

  • SvelteKit data attributes were removed from the element type declarations.

    5.49.2release notes

  • Calling the get function for an unset createContext value on the server now throws.

    5.49.0release notes

  • Invalid {@tag}s now throw.

    5.45.2release notes

  • These await expressions now produce an error at compile time instead of at runtime.

    5.43.14release notes

  • Reactivity context is no longer preserved across function boundaries.

    5.41.2release notes

  • The accessors option is ignored in runes mode; component properties are not accessible on the component instance, so expose component exports if needed.

    5.0.0upgrade guideupgrade guide

  • Parent callbacks now run after child callbacks; it does not run when slot content is updated, and is disallowed in runes mode.

    5.0.0upgrade guideupgrade guide

  • The svelte/legacy asClassComponent function is a stopgap for retaining the Svelte 4 class component API.

    5.0.0upgrade guideupgrade guide

  • In runes mode, concatenated attribute values must be wrapped in quotes; Svelte also warns when a single expression is quoted.

    5.0.0upgrade guideupgrade guide

  • It no longer runs twice on initial render when it modifies a variable referenced in the template, and it does not run when slot content is updated; it is disallowed in runes mode.

    5.0.0upgrade guide

  • Both functions are disallowed in runes mode; use $effect.pre(...) and $effect(...) instead.

    5.0.0upgrade guide

  • beforeUpdate no longer runs twice on initial render when it modifies a variable referenced in the template, and it is disallowed in runes mode; use $effect.pre(...).

    5.0.0upgrade guide

  • When setting this two-way binding, the value must be null, undefined or a FileList.

    5.0.0upgrade guideupgrade guide

  • Binding a component now returns its exports and, when enabled, property accessors, rather than a class instance with $set, $on, and $destroy.

    5.0.0upgrade guideupgrade guide

  • Props in runes mode are not bindable by default; mark bindable props with $bindable.

    5.0.0upgrade guideupgrade guide

  • Use the children prop for default component content and render it with {@render children()}.

    5.0.0upgrade guideupgrade guide

  • Content inside component tags becomes a snippet prop named children, so a separate prop with that name is not allowed.

    5.0.0upgrade guideupgrade guide

  • Class fields are no longer made reactive by compiler-tracked property assignment; define reactive fields with $state on the class.

    5.0.0upgrade guideupgrade guide

  • Setting compatibility.componentApi to 4 enables automatic backwards compatibility so new Component(...) continues working, at some overhead per component.

    5.0.0upgrade guideupgrade guide

  • Components accept callback props for events, replacing dispatching events with createEventDispatcher.

    5.0.0upgrade guide

  • Assignments to destructured parts of an @const declaration are no longer allowed.

    5.0.0upgrade guideupgrade guide

  • When a contenteditable node has a corresponding binding and reactive content, updates to the reactive value no longer update the node's content because the binding takes control.

    5.0.0upgrade guideupgrade guide

  • The svelte/legacy createClassComponent function is a stopgap for retaining the Svelte 4 class component API.

    5.0.0upgrade guideupgrade guide

  • The false, true, and "none" values are no longer valid for the css compiler option.

    5.0.0upgrade guideupgrade guide

  • Svelte no longer guarantees that it inserts the CSS hash last, which may break unusual CSS selectors.

    5.0.0upgrade guideupgrade guide

  • Server rendering no longer returns component CSS by default; set css to 'injected' to add style elements to the head.

    5.0.0upgrade guideupgrade guide

  • Use $derived to declare state computed from other state, replacing derivations written with top-level $: statements.

    5.0.0upgrade guideupgrade guide

  • A tag such as <foo.bar> is now treated as a component instead of an element with the tag name foo.bar.

    5.0.0upgrade guideupgrade guide

  • Duplicate attributes or properties on elements, including event handlers, are not allowed; combine handlers into one function.

    5.0.0upgrade guideupgrade guide

  • Use $effect to create side effects, replacing side effects written with top-level $: statements; it runs at different times than $:.

    5.0.0upgrade guideupgrade guide

  • The enableSourcemap compiler option has been removed because source maps are always generated; tooling can ignore them.

    5.0.0upgrade guideupgrade guide

  • The errorMode compiler option was removed.

    5.0.0upgrade guideupgrade guide

  • Attach event handlers as properties such as onclick instead of using the on: directive; handlers can also use normal property shorthand.

    5.0.0upgrade guideupgrade guide

  • Forward an event by accepting an onclick callback prop and passing it to the element.

    5.0.0upgrade guide

  • Event modifiers do not work with modern event handlers; put handler logic in functions or wrappers, and use an action for passive options.

    5.0.0upgrade guideupgrade guide

  • The component options events property can replace instance $on listeners, though using it is discouraged in favor of callbacks.

    5.0.0upgrade guideupgrade guide

  • The format compiler option was removed.

    5.0.0upgrade guideupgrade guide

  • The compiler now errors on HTML structures that browsers would repair, such as a table row without a tbody.

    5.0.0upgrade guideupgrade guide

  • The hydratable compiler option has been removed because Svelte components are always hydratable.

    5.0.0upgrade guideupgrade guide

  • Use hydrate to instantiate a component and hydrate the server-rendered HTML in its target.

    5.0.0upgrade guide

  • Server rendering uses comments for more robust and efficient client hydration; hydrated HTML must retain or include comments at the correct positions.

    5.0.0upgrade guideupgrade guide

  • Mismatches in <img src={...}> and {@html ...} values are no longer repaired; development warns when values differ.

    5.0.0upgrade guide

  • Selectors inside :is(), :has(), and :where() are now scoped to the current component; use :global(...) when selectors should remain global.

    5.0.0upgrade guideupgrade guide

  • The legacy compiler option that generated bulkier IE-friendly code no longer exists.

    5.0.0upgrade guideupgrade guide

  • The loopGuardTimeout compiler option was removed.

    5.0.0upgrade guideupgrade guide

  • Svelte 5 requires a modern browser and does not support Internet Explorer, including because it uses Proxies and ResizeObserver.

    5.0.0upgrade guideupgrade guide

  • Components are functions rather than classes and should be instantiated with mount instead of new Component(...).

    5.0.0upgrade guideupgrade guide

  • mount now plays transitions by default unless the intro option is false.

    5.0.0upgrade guideupgrade guide

  • The compiler option now accepts only html, mathml and svg; the foreign namespace is no longer valid.

    5.0.0upgrade guideupgrade guide

  • Both values are rendered as the empty string instead of their corresponding strings.

    5.0.0upgrade guideupgrade guide

  • Use the capture suffix on the event name to apply capture handling with modern event attributes.

    5.0.0upgrade guideupgrade guide

  • Some event attributes are delegated, so manually stopping propagation can prevent events from reaching the listener at the root.

    5.0.0upgrade guideupgrade guide

  • HTML event attributes no longer accept string values; use properties like onclick to add event handlers.

    5.0.0upgrade guideupgrade guide

  • Handlers for ontouchmove event attributes are passive by default; use on instead when you need to prevent event defaults.

    5.0.0upgrade guideupgrade guide

  • Handlers for ontouchstart event attributes are passive by default, allowing the browser to scroll without waiting for the handler.

    5.0.0upgrade guideupgrade guide

  • Declare component properties through $props and destructuring, including renamed properties, rest properties, and access to all properties.

    5.0.0upgrade guideupgrade guide

  • Server rendering now passes a component function to render from svelte/server instead of calling the component's render method.

    5.0.0upgrade guideupgrade guide

  • Render snippets, including content passed through props, using the {@render ...} tag.

    5.0.0upgrade guide

  • Runes-mode component exports cannot be bound directly; use bind:this and access the export on the instance.

    5.0.0upgrade guideupgrade guide

  • Snippets provide a more flexible way to define and render sections of UI, including content passed to components.

    5.0.0upgrade guideupgrade guide

  • Use the $state rune to create reactive state; top-level let declarations are no longer implicitly reactive in the new syntax.

    5.0.0upgrade guideupgrade guide

  • Use $state to create a reactive property object and manipulate it instead of calling component $set.

    5.0.0upgrade guideupgrade guide

  • Svelte uses an extra svelte-css-wrapper element instead of a div when wrapping a component that uses CSS custom properties.

    5.0.0upgrade guideupgrade guide

  • The this value must be an expression; a literal tag name must be written as an expression, and Svelte no longer treats it like the corresponding HTML element when determining applicable bindings.

    5.0.0upgrade guideupgrade guide

  • Content inside a svelte:options tag now produces a compiler error.

    5.0.0upgrade guideupgrade guide

  • The sveltePath compiler option was removed.

    5.0.0upgrade guideupgrade guide

  • The tag compiler option was removed; specify customElement="tag-name" in svelte:options inside the component instead.

    5.0.0upgrade guideupgrade guide

  • Use unmount to destroy a mounted component instead of calling $destroy.

    5.0.0upgrade guideupgrade guide

  • The varsReport compiler option was removed.

    5.0.0upgrade guideupgrade guide

  • svelte/compiler no longer reexports walk from estree-walker; import it directly from that package instead.

    5.0.0upgrade guideupgrade guide

  • Whitespace between nodes collapses to one space, while whitespace at tag boundaries is removed, with exceptions such as pre tags.

    5.0.0upgrade guideupgrade guide

Security 14

Deprecations 9

  • Components should accept callback props instead of emitting component events with createEventDispatcher.

    5.0.0upgrade guide

  • Replaces the deprecated SvelteComponent base class type with the function shape of a Svelte component.

    5.0.0upgrade guideupgrade guide

  • ComponentEvents is deprecated because events are now defined as callback props.

    5.0.0upgrade guideupgrade guide

  • ComponentType is deprecated because Component is now the component type.

    5.0.0upgrade guideupgrade guide

  • createEventDispatcher is deprecated; use callback props for component communication.

    5.0.0upgrade guideupgrade guide

  • The on: directive is deprecated in favour of callback props and normal element properties.

    5.0.0upgrade guide

  • A svelte/legacy function can replace event modifiers when migrating event directives to event attributes; the notes recommend migrating away from it in favor of event.preventDefault().

    5.0.0upgrade guideupgrade guide

  • Slots are deprecated in Svelte 5 and replaced by snippets, though they continue to work.

    5.0.0upgrade guideupgrade guide

  • The Svelte 4 base class type is deprecated in favor of the function-shaped Component type.

    5.0.0upgrade guideupgrade guide

New APIs and options 21

  • Added to SvelteMap.

    5.57.0release notes

  • Added as a function to createContext.

    5.57.0release notes

  • Exported from svelte/server for use by developers.

    5.57.0release notes

  • The defaultValue option is now supported on select elements.

    5.57.0release notes

  • The print option indent is now available.

    5.56.7release notes

  • Exports TweenOptions, SpringOptions, SpringUpdateOptions and Updater from svelte/motion.

    5.55.0release notes

  • The custom element shadow option now accepts a ShadowRootInit object.

    5.49.0release notes

  • Export parseCss from svelte/compiler so it can be imported by developers.

    5.48.0release notes

  • Select elements can now be customized.

    5.47.0release notes

  • Adds a csp option to render(...), and emits hashes when using hydratable.

    5.46.0release notes

  • Adds the print function.

    5.45.0release notes

  • Adds the hydratable API.

    5.44.0release notes

  • Adds out-of-order rendering.

    5.43.0release notes

  • An experimental fork API is available.

    5.42.0release notes

  • Adds the $state.eager(value) rune.

    5.41.0release notes

  • Event attributes contribute to more expressive template syntax.

    5.0.0release notes

  • Call flushSync after mount or hydrate when you need synchronous guarantees such as onMount having run or pending promise blocks having rendered.

    5.0.0upgrade guideupgrade guide

  • Use hydrate to instantiate a component and hydrate server-rendered HTML inside its target; it has the same API as mount.

    5.0.0upgrade guide

  • The svelte/legacy run function is used as a migration stopgap for reactive statements that could not reliably be converted; it runs once on the server and as $effect.pre on the client.

    5.0.0upgrade guideupgrade guide

  • Runes bring a more granular reactivity system.

    5.0.0release notes

  • Snippets contribute to more expressive template syntax.

    5.0.0release notes

Performance 21

  • The garbage collector can free each component's AST after compilation.

    5.58.0release notes

  • Server rendering is faster for pages with many or deeply nested components.

    5.58.0release notes

  • Hydration skips redundant attribute writes.

    5.57.3release notes

  • Parser interactions with Acorn are faster or avoided where possible.

    5.57.1release notes

  • Regex matching is avoided in the parser where possible.

    5.57.1release notes

  • SSR rendering reduces render-result garbage collection.

    5.57.1release notes

  • Map lookups for legacy reactive statement ordering change from O(n²) to O(n).

    5.57.0release notes

  • The option/select value guard reuses its cached value.

    5.57.0release notes

  • Make async blocker analysis scale linearly with the number of top-level references.

    5.56.10release notes

  • Compilation skips unnecessary blocker analysis for components without top-level await.

    5.56.6release notes

  • Walk composedPath() directly during delegated event propagation.

    5.55.10release notes

  • Avoids re-traversing the effect tree after $: assignments.

    5.53.8release notes

  • Caches element interactivity and source line splitting in the compiler.

    5.53.7release notes

  • Optimizes CSS selector pruning.

    5.53.7release notes

  • Avoids O(n²) name scanning in scope generate and unique.

    5.53.7release notes

  • The compiler analysis phase is optimized.

    5.53.6release notes

  • Parser hot paths are optimized for faster compilation.

    5.53.6release notes

  • Already settled promises no longer incur async overhead.

    5.48.1release notes

  • Tracing is used less eagerly during development.

    5.43.11release notes

  • Await expressions are optimized more effectively.

    5.41.4release notes

  • Svelte 5 brings even better performance.

    5.0.0release notes

Behavior and default changes 20

  • Declarations are now allowed in the template.

    5.56.0release notes

  • The css compiler option can now be a function.

    5.54.0release notes

  • The customElement compiler option can now be a function.

    5.54.0release notes

  • The runes compiler option can now be a function.

    5.54.0release notes

  • Comments are now allowed in tags, expanding the syntax developers can write.

    5.53.0release notes

  • Error boundaries now work on the server.

    5.53.0release notes

  • Supports TrustedHTML in {@html} expressions.

    5.52.0release notes

  • Effects are proactively deferred in a pending boundary, changing when they run.

    5.51.4release notes

  • Can now be used when instantiating components programmatically.

    5.50.0release notes

  • The assignment_value_stale warning is issued more conservatively.

    5.49.0release notes

  • Adds more CSS selectors to print().

    5.45.7release notes

  • The state_referenced_locally diagnostic now applies to props.

    5.45.3release notes

  • Attachments and attribute effects are no longer executed eagerly.

    5.43.15release notes

  • The restriction against calling flushSync in effects has been lifted.

    5.43.15release notes

  • Vite optimized deps are excluded from stack traces, making those traces less cluttered.

    5.41.3release notes

  • Component references rendered directly, such as <Thing />, now update when their value changes; svelte:component is no longer necessary.

    5.0.0upgrade guideupgrade guide

  • Mismatches in img src values and {@html} content are assumed unchanged rather than repaired; development warns when they differ.

    5.0.0upgrade guide

  • The immutable option has no effect in runes mode; its concept is replaced by how $state and its variations work.

    5.0.0upgrade guideupgrade guide

  • The compiler option or per-component svelte:options setting can disable whitespace trimming.

    5.0.0upgrade guideupgrade guide

  • Scoped CSS selectors now use :where(.svelte-xyz123) alongside .svelte-xyz123 to avoid issues caused by unpredictable specificity changes.

    5.0.0upgrade guideupgrade guide

Tooling 6

  • Devtools can track the component instance in which an element was rendered.

    5.58.0release notes

  • Dev __svelte_meta render entries now include snippetName.

    5.58.0release notes

  • Provides a proper public type for the parseCss result.

    5.50.2release notes

  • A VS Code command migrates a single component to Svelte 5 syntax.

    5.0.0upgrade guideupgrade guide

  • Svelte 5 brings native TypeScript support.

    5.0.0release notes

  • A migration script automates common Svelte 5 updates, including runes, event attributes, snippets, component instantiation, and core dependency bumps.

    5.0.0upgrade guideupgrade guide

Fixes and other changes 329

  • The autocorrect attribute is now allowed on all elements.

    5.58.0release notes

  • Hydrating a different branch containing a failed boundary now removes all server-rendered content.

    5.58.0release notes

  • Printing now preserves directive values that match the directive name.

    5.58.0release notes

  • Snippet type parameters containing arrow function types are now parsed correctly.

    5.58.0release notes

  • Server rendering now matches the client for <title> elements and ignores titles inside failed boundaries.

    5.58.0release notes

  • A11y checks now use the first valid fallback role in role.

    5.57.3release notes

  • State sources continue to be created for property checks during component initialization.

    5.57.3release notes

  • Missing state property checks are tracked in unowned deriveds.

    5.57.3release notes

  • A redundant link role is no longer warned about on area elements without an href.

    5.57.2release notes

  • Await blocks with only a pending branch are printed correctly.

    5.57.2release notes

  • Await wrappers preserve location information.

    5.57.2release notes

  • Removing the focused element while using bind:activeElement no longer throws state_unsafe_mutation.

    5.57.2release notes

  • Stale boundary reset callbacks are ignored.

    5.57.2release notes

  • Hydration state is restored if a custom element attribute update throws.

    5.57.2release notes

  • Deferred transitions aborted before initialization are handled.

    5.57.2release notes

  • Reconnecting deriveds no longer creates duplicate subscriptions.

    5.57.2release notes

  • Dynamic element connections are preserved during hydration.

    5.57.2release notes

  • Each-block commits read the batch-local array.

    5.57.2release notes

  • Compilation errors if {:else} is followed by another {:else} or {:else if ...}.

    5.57.2release notes

  • Event handlers assigned after top-level await are attached in production.

    5.57.2release notes

  • Pending work is flushed before the flushSync callback is invoked.

    5.57.2release notes

  • Hydration recovers if an unexpected node replaces a nested boundary comment.

    5.57.2release notes

  • Error boundaries no longer intercept hydration mismatch recovery.

    5.57.2release notes

  • When migration cannot turn a reactive assignment into a declaration, it keeps the assignment even when it has no dependencies.

    5.57.2release notes

  • Migration no longer hangs on a declaration sharing a line with its script tag.

    5.57.2release notes

  • Compilation errors when a declaration in a snippet redeclares one of its parameters.

    5.57.2release notes

  • An unchanged spread value is no longer overwritten, preserving incomplete number input.

    5.57.2release notes

  • URL updates no longer track SvelteURLSearchParams.

    5.57.2release notes

  • Components destroyed while waiting for top-level await no longer create async deriveds.

    5.57.2release notes

  • Untracked derived reads no longer retain disconnected dependencies.

    5.57.2release notes

  • aria-braillelabel is recognized as a known ARIA attribute.

    5.57.1release notes

  • aria-brailleroledescription is recognized as a known ARIA attribute.

    5.57.1release notes

  • Deferred event listeners are cancelled during cleanup.

    5.57.1release notes

  • The fallback of an each block resolves in the enclosing scope.

    5.57.1release notes

  • Effect trees of batches no longer interfere with each other.

    5.57.1release notes

  • Global CSS is preserved in components without scopable elements.

    5.57.1release notes

  • Input default values are serialized during server rendering.

    5.57.1release notes

  • Object.hasOwn reacts to ownership changes on state proxies.

    5.57.1release notes

  • $state.eager is preserved when used as a variable initializer.

    5.57.1release notes

  • The accessibility check now accepts onfocusin and onfocusout.

    5.57.0release notes

  • Line feed character references are preserved in attribute values.

    5.57.0release notes

  • Omitted from SSR output because it has no HTML attribute.

    5.57.0release notes

  • Preserved on hydrated radio inputs with spread attributes.

    5.57.0release notes

  • Teardown errors are routed through invoke_error_boundary.

    5.57.0release notes

  • CSS tree-shaking is avoided for exported Snippet.

    5.57.0release notes

  • They are measured before their starting styles are applied.

    5.57.0release notes

  • Uppercase-X hexadecimal numeric character references are decoded.

    5.57.0release notes

  • Callbacks run when a server render throws.

    5.57.0release notes

  • No longer fires twice when compilerOptions.hmr is true.

    5.57.0release notes

  • They are no longer resurrected when an ancestor block is paused and resumed.

    5.57.0release notes

  • Dependencies of a reaction that throws are kept, preventing deriveds it read from being leaked or stuck in their error.

    5.57.0release notes

  • Static value attributes no longer produce malformed AST output.

    5.57.0release notes

  • Mutating selectedcontent no longer changes the selected option.

    5.57.0release notes

  • Warnings are now emitted for undeclared shorthand event handlers on svelte:window, svelte:document, and svelte:body.

    5.57.0release notes

  • The transition no longer produces NaN keyframe values for elements without a layout box.

    5.57.0release notes

  • Failed snippets are scoped to their boundary.

    5.57.0release notes

  • Component instances stored in $state are no longer turned into state proxies.

    5.57.0release notes

  • Template store subscriptions are blocked on the promise that assigns the store.

    5.57.0release notes

  • Rendering of Svelte custom element slots is more robust.

    5.57.0release notes

  • Anchors are removed on unmount.

    5.57.0release notes

  • Elements inside svelte:head no longer receive a class hash.

    5.57.0release notes

  • Snapshots are now tracked in reactions.

    5.57.0release notes

  • The port signal is synchronized when the protocol setter clears the port.

    5.57.0release notes

  • Static textarea value attributes are properly applied during CSR.

    5.57.0release notes

  • Correctly print await blocks with catch clauses.

    5.56.10release notes

  • Apply CSS custom properties with falsy values on components.

    5.56.10release notes

  • Preserve CSS escape sequences when printing selectors.

    5.56.10release notes

  • Preserve namespaces in CSS type selectors.

    5.56.10release notes

  • Allow custom elements to receive async values as props.

    5.56.10release notes

  • Avoid double-calling a derived reference when destructuring $derived of another $derived during server-side rendering.

    5.56.10release notes

  • Give effect teardowns the value from before the first write in a flush.

    5.56.10release notes

  • Release last_propagated_event after propagation settles so it no longer retains the last event's target subtree.

    5.56.10release notes

  • Strip comments from inline style values in linear time.

    5.56.10release notes

  • Transform expressions inside labeled statements during server compilation.

    5.56.10release notes

  • Ignore Program node comments during migration.

    5.56.10release notes

  • Parse :nth-child(2n of.foo) when of is not followed by whitespace.

    5.56.10release notes

  • Increment private state fields through a non-this receiver and preserve short-circuiting for logical assignments.

    5.56.10release notes

  • Clean up removed capture event handlers from spread attributes.

    5.56.10release notes

  • Comments in attributes are no longer duplicated.

    5.56.9release notes

  • The controlled each fast path is skipped while another batch is pending, fixing behavior in that situation.

    5.56.9release notes

  • The AST printer now preserves CSS comments.

    5.56.9release notes

  • Whitespace handling inside the printer was improved.

    5.56.9release notes

  • Hydrating a failed boundary now calls onerror and provides a working reset.

    5.56.8release notes

  • Reset now works when hydrating a failed boundary.

    5.56.8release notes

  • Select selection is now preserved when spread attributes omit value.

    5.56.8release notes

  • A derived with an abort controller is rerun when it reconnects.

    5.56.6release notes

  • Declaration tags no longer trigger a warning in event handlers.

    5.56.5release notes

  • Declaration tags are correctly transformed during SSR.

    5.56.5release notes

  • Declaration tags are no longer treated as parts inside each blocks.

    5.56.5release notes

  • Deriveds read inside branch or root effects are no longer incorrectly reconnected.

    5.56.5release notes

  • An unnecessary derived effect is skipped in an earlier batch.

    5.56.5release notes

  • A derived's own AbortSignal is aborted when it disconnects.

    5.56.5release notes

  • Computed keys in keyed each-block destructuring patterns are now transformed correctly.

    5.56.5release notes

  • Sourcemaps are chained with an empty sources[0] instead of being dropped.

    5.56.5release notes

  • The compiler now correctly transforms $state.eager() for SSR output.

    5.56.5release notes

  • Clearing the previous task reference after abort prevents a memory leak on interrupted tweens.

    5.56.5release notes

  • The declarator end position now includes wrapping parentheses, improving source position information for {@const} declarations.

    5.56.4release notes

  • Reactivity context is now always unset after being restored, preventing context from being left set.

    5.56.4release notes

  • Optional parameters are stripped so the generated JavaScript is valid.

    5.56.4release notes

  • Subscribers are no longer notified when the URL changes without affecting the search string.

    5.56.4release notes

  • Errors that occur in destroyed effects are now ignored.

    5.56.3release notes

  • BigInts in $state.snapshot(...) return values are now correctly typed.

    5.56.3release notes

  • Declaration tags are ignored for the animation directive.

    5.56.2release notes

  • Pending async deriveds are rejected when discarded.

    5.56.2release notes

  • Declaration tag contents are parsed more robustly, including when they contain type.

    5.56.1release notes

  • References to earlier declarators in a declaration tag are transformed correctly.

    5.56.1release notes

  • The compiler no longer emits spurious state_referenced_locally warnings for $derived declarations in declaration tags.

    5.56.1release notes

  • Whitespace before let or const in declaration tags is now tolerated.

    5.56.1release notes

  • Reference checks for blockers now run on the server as well.

    5.56.1release notes

  • Setting duplicate keys to the same joined value now updates SvelteURLSearchParams correctly.

    5.56.1release notes

  • Parsing no longer enters an infinite loop when a tag expression ends with a trailing / at end of input.

    5.56.1release notes

  • Newlines in spread input values are preserved when the type attribute follows value.

    5.56.1release notes

  • Include the tag name in this accessibility warning.

    5.55.10release notes

  • Correctly coordinate component-level effects inside async blocks.

    5.55.10release notes

  • Async blockers propagate through closure references, so template expressions correctly wait for awaited values.

    5.55.10release notes

  • Allow $derived(await ...) in disconnected effect roots.

    5.55.10release notes

  • Declare let: directives before {@const} declarations on slotted elements.

    5.55.10release notes

  • Resume branches that were kept around after being outro-ed.

    5.55.10release notes

  • Avoid emitting a waterfall warning when an async operation resolves to the same value.

    5.55.10release notes

  • Promise-ifies {#await await ...} expressions on the server and correctly hydrates them on the client.

    5.55.9release notes

  • An uninitialized derived now executes even if it has been destroyed.

    5.55.8release notes

  • Context is unset synchronously in run.

    5.55.8release notes

  • Teardown effects no longer run when deriveds are unfrozen.

    5.55.8release notes

  • Empty attribute names are disallowed during SSR.

    5.55.7release notes

  • Updating bind:this accounts for proxified instances.

    5.55.6release notes

  • Component member expressions compile correctly for SSR.

    5.55.6release notes

  • Comments are ignored when reading CSS values.

    5.55.6release notes

  • @debug tags can reference awaited variables.

    5.55.6release notes

  • Eager effects are flushed in production.

    5.55.6release notes

  • Errors from failed iterables are rethrown after calling return().

    5.55.6release notes

  • Fallback props rerun when their dependencies update.

    5.55.6release notes

  • False-positive errors from $inspect dependencies are ignored.

    5.55.6release notes

  • Running obsolete async branches are aborted.

    5.55.6release notes

  • The typings allow null for pending.

    5.55.6release notes

  • Promise.all is wrapped in save during SSR.

    5.55.6release notes

  • Context is reapplied after an error is transformed during SSR.

    5.55.6release notes

  • Stale deriveds resolve with the latest value.

    5.55.6release notes

  • Stale promises are left to wait for a later resolution instead of being rejected.

    5.55.6release notes

  • Dependencies of $state.eager/pending are kept.

    5.55.6release notes

  • Deriveds are no longer marked while an effect is updating.

    5.55.5release notes

  • Child effect roots are no longer marked as inert.

    5.55.4release notes

  • Context is reset after waiting on blockers of @const expressions.

    5.55.4release notes

  • New eager effects continue to be flushed.

    5.55.4release notes

  • Blockers for @const are now calculated correctly.

    5.55.3release notes

  • Deriveds are frozen once their containing effects are destroyed.

    5.55.3release notes

  • HMR updates for dynamic components are now handled properly.

    5.55.3release notes

  • Error boundary rendering is deferred in forks.

    5.55.3release notes

  • Prevents a false-positive reactivity loss warning.

    5.55.3release notesrelease notes

  • In legacy mode, @const tags are invalidated based on visible references.

    5.55.2release notes

  • In dev mode, $destroy, set, and on instance methods are no longer overridden.

    5.55.2release notes

  • Types for ontoggle on <details> elements are corrected.

    5.55.2release notes

  • Parentheses in template expressions are handled more robustly.

    5.55.2release notes

  • Improves the error message for duplicate module imports.

    5.55.1release notes

  • New effects are rescheduled in prior batches.

    5.55.1release notes

  • Prevents a hydration error when using async {@html ...}.

    5.55.1release notes

  • Bindings are now correctly handled on the server.

    5.55.1release notes

  • Forwards the correct start and end nodes to the active effect.

    5.55.0release notes

  • Defers batch resolution until earlier intersecting batches have committed.

    5.54.1release notes

  • Fixes hydration comments during HMR, addressing incorrect hydration behavior during hot module replacement.

    5.54.1release notes

  • Properly invokes iterator.return() during the reactivity loss check.

    5.54.1release notes

  • Reactivity loss tracking has been reinstated.

    5.54.0release notes

  • Nodes are removed in a boundary when work is pending and HMR is active.

    5.53.13release notes

  • Using $inspect after top-level await no longer breaks builds.

    5.53.13release notes

  • Batches made obsolete by a commit are discarded.

    5.53.13release notes

  • Inert effects resume when they come from offscreen.

    5.53.13release notes

  • The standalone-child state is correctly reset.

    5.53.13release notes

  • Templates no longer eagerly access functions that have not yet been initialized.

    5.53.13release notes

  • Handles asynchronous right-hand sides in assignment_value_stale.

    5.53.12release notes

  • Ensures derived values remain correct across batches.

    5.53.12release notes

  • Updates the select’s internal value on change, fixing select value behavior.

    5.53.12release notes

  • Lazily evaluates the right-hand side when checking for assignment_value_stale.

    5.53.11release notes

  • Recovers from errors that leave the effect tree corrupted.

    5.53.11release notes

  • Resolves the boundary in the correct batch during hydration.

    5.53.11release notes

  • Removes a circular dependency involving untrack.

    5.53.11release notes

  • Batches are re-processed when new root effects are scheduled.

    5.53.10release notes

  • Improves cleanup timing for bind:this.

    5.53.9release notes

  • Handles async updates within a pending boundary.

    5.53.8release notes

  • {@html} no longer duplicates content inside contenteditable elements.

    5.53.8release notes

  • Preserves original boundary errors when keyed each rows are removed during async updates.

    5.53.7release notes

  • Preserves each items that are needed by pending batches.

    5.53.7release notes

  • Event handlers are always case insensitive during SSR.

    5.53.6release notes

  • Fixes incorrect handling of keys with undefined values.

    5.53.6release notes

  • The search setter now returns the normalized value, matching native URL behavior.

    5.53.6release notes

  • Default parameters no longer cause scope leaks.

    5.53.4release notes

  • Flushed effects no longer run again.

    5.53.4release notes

  • If blocks hydrate correctly.

    5.53.4release notes

  • Server context is set after async transformError.

    5.53.4release notes

  • The :catch branch of an #await block now renders with the correct key.

    5.53.3release notes

  • String coercion is now consistent with toString.

    5.53.3release notes

  • Fixes update expressions on server deriveds.

    5.53.2release notes

  • Handles shadowed function names correctly.

    5.53.1release notes

  • Head effects are now kept in the effect tree.

    5.53.0release notes

  • TrustedHTML is used to test for customizable <select> support where necessary.

    5.53.0release notes

  • Repairs truthy/falsy hydration mismatches for dynamic components.

    5.52.0release notes

  • Re-runs non-render-bound deriveds on the server.

    5.52.0release notes

  • Fixes miscellaneous option escaping and backwards compatibility.

    5.51.5release notes

  • Event handlers are stripped during SSR.

    5.51.5release notes

  • In dev mode, non-idempotent each block keys are detected and reported as errors.

    5.51.4release notes

  • Treats CSS attribute selectors as case-insensitive for HTML enumerated attributes.

    5.51.3release notes

  • Prevents event delegation logic from conflicting between Svelte instances.

    5.51.3release notes

  • Runs effects in pending snippets.

    5.51.3release notes

  • Locates the Rollup annotation so it is friendly to JavaScript downgraders.

    5.51.3release notes

  • Dev delegated handlers now take async into consideration.

    5.51.2release notes

  • The state_referenced_locally warning is now emitted for non-destructured props.

    5.51.2release notes

  • Fixes a crash when document.contentType is undefined.

    5.51.1release notes

  • Uses symbols for encapsulated event delegation.

    5.51.1release notes

  • Delegated event handlers are preserved while one or more root components are using them.

    5.51.0release notes

  • Block-level elements are flushed into separate sequences when formatting output.

    5.51.0release notes

  • Freezes effects inside deriveds when disconnecting and unfreezes them on reconnect.

    5.50.3release notes

  • Always lowercases HTML elements for XHTML compliance.

    5.50.3release notes

  • Renders multiple and selected attributes as empty strings for XHTML compliance.

    5.50.3release notes

  • Accounts for nodeName case sensitivity on XHTML pages.

    5.50.3release notes

  • Propagates $effect errors to the boundary.

    5.50.3release notes

  • Doesn't swallow DOMException when media.play() fails.

    5.50.2release notes

  • Resolves effect_update_depth_exceeded when using bind:value on a <select> with derived state in legacy mode.

    5.50.2release notes

  • Prevents hydration mismatches for async render tags.

    5.50.1release notes

  • Boolean attribute values are rendered as empty strings for XHTML compliance.

    5.50.1release notes

  • Already-resolved async blocks are properly hydrated.

    5.50.0release notes

  • Infinite effect loops are cleared after flushing.

    5.50.0release notes

  • Key blocks now allow NaN as their key.

    5.50.0release notes

  • Accessibility role checks treat <menu> like <ul> and <ol>.

    5.50.0release notes

  • Hydration exits resolved async blocks on the correct node.

    5.50.0release notes

  • Stores in each block expressions are detected regardless of AST shape.

    5.50.0release notes

  • Avoids generating erroneous async derived expressions for blocks.

    5.49.2release notes

  • Effects inside unskipped branches are rescheduled.

    5.49.2release notes

  • Avoids Cloudflare warnings about the missing node:crypto module.

    5.49.2release notes

  • Consecutive large text nodes are merged.

    5.49.1release notes

  • Multiline HTML blocks are properly separated from each other in print output.

    5.49.1release notes

  • Prevents unhandled exceptions arising from dangling promises in script blocks.

    5.49.1release notes

  • Async functions are created in SSR output only when necessary.

    5.49.1release notes

  • Effects inside skipped branches are reset.

    5.49.0release notes

  • The introstart event fires after the specified delay.

    5.49.0release notes

  • The outrostart event fires after the specified delay.

    5.49.0release notes

  • Popover elements are disregarded when determining whether an element has content.

    5.49.0release notes

  • Updating a reaction inside a fork now preserves its old dependencies.

    5.49.0release notes

  • Signal versions are incremented when forks are discarded.

    5.49.0release notes

  • Fixes each blocks breaking when effects are interspersed among items.

    5.48.5release notes

  • Prevents unintended exports from namespaces.

    5.48.5release notes

  • Boundary onerror callbacks now run in a microtask in case they result in the boundary's destruction.

    5.48.5release notes

  • Avoids duplicating escaped characters in the CSS AST.

    5.48.4release notes

  • The warning now includes pointer and touch events.

    5.48.3release notes

  • Avoids unnecessary block effect re-runs after async work completes.

    5.48.3release notes

  • Fixes handling of false dynamic components during server-side rendering.

    5.48.3release notes

  • Fixes hydration failing with settled async blocks.

    5.48.3release notes

  • The wait function is now exported from the internal client index, making it available to importers of that index.

    5.48.2release notes

  • Resolution of async work is batched.

    5.48.1release notes

  • Code generation is improved for const tags with async dependencies.

    5.48.1release notes

  • Await expressions inside {@html} are hydrated properly.

    5.48.1release notes

  • Snippets are hoisted above const declarations in the same block, fixing their handling when declared after a const.

    5.48.1release notes

  • Handle non-string values in the this attribute.

    5.48.0release notes

  • Fixes triggering reactivity for selectedcontent.

    5.47.1release notes

  • Static elements are no longer reset when used with debug or snippets.

    5.47.0release notes

  • The subtree of a Svelte boundary is now marked as dynamic.

    5.47.0release notes

  • Hydratable keys are serialized using devalue.uneval.

    5.46.4release notes

  • Clean derived values reconnect when read in a reactive context.

    5.46.3release notes

  • Prevents an infinite loop when HMRing a component with an await.

    5.46.1release notes

  • The currentTarget type in the on function is fixed.

    5.46.1release notes

  • Static optimisation is skipped for stateless deriveds after await.

    5.46.1release notes

  • Fixes a race condition when importing AsyncLocalStorage.

    5.45.10release notes

  • Deferred effects are correctly rescheduled when a batch is revived after async work.

    5.45.9release notes

  • Correctly prints !doctype during print.

    5.45.9release notes

  • The AST root's end is set to template.length.

    5.45.8release notes

  • The AST root's start is set to 0.

    5.45.8release notes

  • Prevents erroneous state_referenced_locally warnings on prop fallbacks.

    5.45.8release notes

  • Prevents a crash when hydratable serialization fails.

    5.45.7release notes

  • Accepts off as a valid value for the textarea wrap attribute.

    5.45.7release notes

  • srcObject is now permitted as an attribute on <audio> and <video> elements.

    5.45.6release notes

  • Svelte no longer issues an accessibility warning for a <video> without captions when it has no src.

    5.45.6release notes

  • Blocks are now correctly reconciled after outroing branches are resumed.

    5.45.5release notes

  • Items are now destroyed after their siblings are resumed.

    5.45.5release notes

  • Allows $props.id() to occur after an await.

    5.45.4release notes

  • Keeps reactions up to date even when read outside of an effect.

    5.45.4release notes

  • Cross-realm Promises are now handled in hydratable.

    5.45.3release notes

  • Node locations are preserved to improve sourcemaps.

    5.45.3release notes

  • Fixes array destructuring after await.

    5.45.2release notes

  • Blockers are awaited before const declarations are initialized, preventing incorrect initialization behavior.

    5.44.1release notes

  • Generated code for simple destructurings is corrected.

    5.44.1release notes

  • Animations in each blocks no longer interfere with transitions.

    5.44.1release notes

  • Offscreen items and the last effect in each block are linked correctly.

    5.44.1release notesrelease notes

  • Forked derived values are now stored.

    5.43.15release notes

  • Async blockers are now taken into account for bindings, transitions, animations, and attachments.

    5.43.14release notes

  • Named self-closing slots are now migrated correctly.

    5.43.14release notes

  • Derived values are no longer set during time traveling.

    5.43.13release notes

  • Maintains the correct linked list of effects when updating each blocks.

    5.43.12release notes

  • Transitions of elements that are already outroing are no longer canceled.

    5.43.11release notes

  • Prevents other batches from running while the main batch has queued root effects.

    5.43.10release notes

  • Functions are now handled correctly when determining async blockers.

    5.43.9release notes

  • Blockers are now taken into account when creating #await blocks.

    5.43.9release notes

  • Async @const in a boundary now hydrates correctly.

    5.43.9release notes

  • Async @const expressions in templates are now parallelized.

    5.43.9release notes

  • Deriveds remain reactive after their original parent effect is destroyed.

    5.43.9release notes

  • Eager effects no longer break the reactions chain.

    5.43.9release notes

  • Fixes each blocks losing reactivity when items are removed while a promise is pending.

    5.43.8release notes

  • Blockers of components are taken into account.

    5.43.7release notes

  • Deferred effects can be rescheduled later on.

    5.43.7release notes

  • Fixes batch deactivation so other batches are not deactivated.

    5.43.6release notes

  • Dependencies of async bindings are now awaited.

    5.43.5release notes

  • Async static props and attributes are now awaited.

    5.43.5release notes

  • Dependencies of style directives are now awaited.

    5.43.5release notes

  • Deriveds reconnect to the effect tree when time-travelling.

    5.43.4release notes

  • Symbols are preserved when creating derived rest properties.

    5.43.3release notes

  • The document title is deferred until async work is complete.

    5.43.3release notesrelease notes

  • Forks now always access the correct values.

    5.43.3release notes

  • Each blocks with async dependencies are treated as uncontrolled.

    5.43.2release notes

  • Fixes transformation of $bindable after await expressions.

    5.43.1release notes

  • Settles a batch after DOM updates.

    5.43.0release notes

  • Fixes batch restoration in #await.

    5.42.3release notes

  • Fixes handling of <svelte:head> when rendered asynchronously.

    5.42.3release notes

  • Error messages for global variable assignments are clearer.

    5.42.2release notes

  • Calling discard on a fork after commit is ignored.

    5.42.1release notes

  • Inspect errors now have less confusing names.

    5.42.0release notes

  • setContext is now always allowed before the first await in a component.

    5.42.0release notes

  • Pending changes are flushed after rendering a failed snippet.

    5.41.4release notes

  • Mounting snippets is coordinated with await expressions.

    5.41.4release notes

  • Static blocks are now taken into account when determining transition locality.

    5.41.4release notes

  • Batches stay alive until all async work is complete.

    5.41.2release notes

  • Guards such as if, each, and key run before their contents.

    5.41.2release notes

  • $inspect logs now come from the callsite.

    5.41.2release notes

  • Fixes declaration placement by placing let: declarations before {@const} declarations.

    5.41.1release notes

  • Improves the each_key_without_as error.

    5.41.1release notes

  • Reports an error when an each block has a key but no as clause.

    5.41.0release notes

  • Preserves <select> state while the element is focused.

    5.41.0release notes

  • Adds hydration markers in the pending branch of an SSR boundary.

    5.40.2release notes

  • The sync-in-async warning is removed for server rendering.

    5.40.1release notes

  • Svelte 5 remains compatible with the previous syntax.

    5.0.0release notes

  • Error and warning codes use underscores instead of dashes, and a handful of codes have been reworded.

    5.0.0upgrade guideupgrade guide

  • Bindings now account for form reset events so their values do not get out of sync with the DOM.

    5.0.0upgrade guideupgrade guide

  • Svelte preserves slot elements that are children of template elements with a declarative shadow root.

    5.0.0upgrade guideupgrade guide

  • Svelte 5 continues to support the old syntax, and components using old and new syntax can be mixed.

    5.0.0upgrade guide

svelte 462 changes

Breaking changes 37

  • Types for Action and ActionReturn are stricter, which may require migration of existing TypeScript code.

    4.0.0release notes

  • The default parameter type is now undefined; specify the generic when an action receives a parameter.

    4.0.0upgrade guide

  • Bundlers must specify the browser condition when building a frontend bundle for the browser.

    4.0.0release notesupgrade guide

  • Rollup users should set browser to true in @rollup/plugin-node-resolve options.

    4.0.0upgrade guide

  • The CommonJS runtime version has been removed.

    4.0.0upgrade guide

  • The runtime now uses classList.toggle(name, boolean), which does not work in very old browsers.

    4.0.0release notesupgrade guide

  • Webpack users must add browser to the conditionNames array when building for the browser.

    4.0.0upgrade guide

  • Types for createEventDispatcher are stricter, which may require migration of existing TypeScript code.

    4.0.0release notesupgrade guide

  • Slots are treated as if they do not exist when using CSS adjacent and general sibling combinators.

    4.0.0release notes

  • The update timing of custom element properties has changed slightly.

    4.0.0upgrade guide

  • Creating custom elements with Svelte was overhauled; consult the PR for the list of changes and migration instructions.

    4.0.0release notes

  • The runtime now uses the CustomEvent constructor, which may require a polyfill in very old browsers.

    4.0.0upgrade guide

  • derived now errors on falsy values passed instead of stores.

    4.0.0release notesupgrade guide

  • DOM node removal is now batched, which can change event order observed with a MutationObserver.

    4.0.0upgrade guide

  • The runtime now applies inert to outroing elements.

    4.0.0release notesupgrade guide

  • The minimum supported Node version is now 16.

    4.0.0release notesupgrade guide

  • onMount now reports a type error when a function is returned asynchronously, catching potential callback-function mistakes.

    4.0.0release notesupgrade guide

  • Preprocessors now run in configured order, with markup, script, and style processed in that order within each group.

    4.0.0upgrade guide

  • Each preprocessor must now have a name.

    4.0.0upgrade guide

  • The order in which preprocessors are applied has changed.

    4.0.0release notes

  • Var declarations extending the reactive statement scope are explicitly disallowed.

    4.0.0release notes

  • The minimum supported rollup-plugin-svelte version is now 7.1.5.

    4.0.0release notesupgrade guide

  • Default slot bindings are no longer exposed to named slots, and named slot bindings are no longer exposed to the default slot.

    4.0.0release notesupgrade guide

  • Custom store implementations using StartStopNotifier must pass an update function in addition to the set function.

    4.0.0upgrade guide

  • Use types from svelte/elements instead of accessing type definitions through the svelte.JSX namespace.

    4.0.0upgrade guide

  • Type definitions for svelte/internal were removed to discourage reliance on internal methods that are not public API.

    4.0.0upgrade guide

  • The minimum supported svelte-loader version is now 3.1.8.

    4.0.0release notesupgrade guide

  • The svelte/register hook was removed, along with the CJS runtime version and CJS compiler output.

    4.0.0release notesupgrade guide

  • The svelte/register hook has been removed.

    4.0.0upgrade guide

  • Migrate global typing extensions from the svelte.JSX namespace to svelteHTML, and use svelte/elements for its type definitions.

    4.0.0upgrade guide

  • Use the svelteHTML namespace instead of svelte.JSX when enhancing global typings.

    4.0.0upgrade guide

  • SvelteKit users must upgrade to 1.20.4 or newer.

    4.0.0upgrade guide

  • Transitions are local by default to prevent confusion around page navigations.

    4.0.0release notesupgrade guide

  • The minimum supported TypeScript version is now 5; lower versions may work but are not guaranteed.

    4.0.0release notesupgrade guide

  • Custom store implementers must now pass an update function in addition to the set function.

    4.0.0release notes

  • The minimum supported vite-plugin-svelte version is now 2.4.1; SvelteKit users can upgrade to 1.20.0 or newer for compatibility.

    4.0.0release notesupgrade guide

  • The minimum supported webpack version is now 5.

    4.0.0release notesupgrade guide

Security 2

  • The stylesheet is initialized with /* empty */ to enable setting a CSP directive that also works in Safari.

    4.0.0release notes

  • Transitions no longer require a style-src 'unsafe-inline' Content Security Policy.

    4.0.0release notes

Deprecations 6

  • Svelte warns about colons in attributes and props to prevent ambiguity with Svelte directives.

    4.0.0release notes

  • A boolean compilerOptions.css value now produces a warning.

    4.0.0release notes

  • eslint-plugin-svelte3 is deprecated and may work with Svelte 4, but support is not guaranteed.

    4.0.0upgrade guide

  • SvelteComponent now has the typing capabilities previously provided by SvelteComponentTyped.

    4.0.0upgrade guide

  • SvelteComponentTyped is deprecated in favor of SvelteComponent.

    4.0.0release notesupgrade guide

  • The svelte:options tag option is deprecated in favor of customElement.

    4.0.0upgrade guide

New APIs and options 7

  • A new accessibility rule, a11y-no-static-element-interactions, is available.

    4.0.0release notes

  • Set discloseVersion to false to opt out of adding version information to window.

    4.0.0release notes

  • ComponentType is now exported from the svelte entrypoint.

    4.0.0release notes

  • The new svelte:options customElement option replaces tag and enables more configurability for custom elements.

    4.0.0upgrade guide

  • Add the |global modifier to make transitions play when any control-flow block above is created or destroyed.

    4.0.0upgrade guide

  • A way was added to modify attributes for script and style preprocessors.

    4.0.0release notes

  • Version information is added to window; it can be opted out of with compilerOptions.discloseVersion set to false.

    4.0.0release notes

Performance 1

  • Hydration adds a data-svelte-h attribute to detect unchanged HTML elements and improve hydration speed.

    4.0.0release notes

Behavior and default changes 1

  • #each can now iterate over iterables such as Set and Map.

    4.0.0release notes

Tooling 2

  • A new accessibility rule, a11y no-noninteractive-element-interactions, is available.

    4.0.0release notes

  • The new eslint-plugin-svelte package is recommended as the replacement for eslint-plugin-svelte3.

    4.0.0upgrade guide

Fixes and other changes 6

  • The error message is improved when animate: directives are used on inline components.

    4.0.0release notes

  • The runtime now uses the CustomEvent constructor instead of the deprecated createEvent method.

    4.0.0release notes

  • Derived store types were fixed.

    4.0.0release notes

  • Binding null option and input values is now consistent.

    4.0.0release notes

  • $store can now be used with changing values, including nullish values.

    4.0.0release notes

  • The correct SvelteComponent type is now exported.

    4.0.0release notes