diff --git a/.changeset/seven-shrimps-explode.md b/.changeset/seven-shrimps-explode.md new file mode 100644 index 000000000000..306c3feb1aff --- /dev/null +++ b/.changeset/seven-shrimps-explode.md @@ -0,0 +1,5 @@ +--- +'svelte': patch +--- + +perf: inline default imports into template diff --git a/packages/svelte/src/compiler/phases/3-transform/client/utils.js b/packages/svelte/src/compiler/phases/3-transform/client/utils.js index 9463d909bc3a..0b6896589ab7 100644 --- a/packages/svelte/src/compiler/phases/3-transform/client/utils.js +++ b/packages/svelte/src/compiler/phases/3-transform/client/utils.js @@ -314,15 +314,12 @@ export function create_derived(state, arg) { /** * Whether a variable can be referenced directly from template string. - * @param {import('#compiler').Binding | undefined} binding + * @param {import('#compiler').Binding} binding * @returns {boolean} */ export function can_inline_variable(binding) { return ( - !!binding && // in a ` +