We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f1ddff commit d55c48fCopy full SHA for d55c48f
packages/svelte/src/compiler/phases/2-analyze/index.js
@@ -268,6 +268,7 @@ export function analyze_component(root, options) {
268
(declaration !== null &&
269
// const state = $state(0) is valid
270
get_rune(declaration.initial, instance.scope) === null &&
271
+ // allow `import { derived } from 'svelte/store'` in the same file as `const x = $derived(..)` because one is not a subscription to the other
272
!(
273
name === '$derived' &&
274
declaration.initial?.type === 'ImportDeclaration' &&
0 commit comments