You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Thanks for the project. Library already preserves all `.svelte` imports. This PR change behaviour to preserve _all_ imports, because imported variables can be not only svelte components but also values which svelte template actually uses. Example:
```
<script lang="ts">
import { writable } from "svelte/store";
import { count } from "./stores";
import Counter from "./Counter.svelte";
export let name: number;
export let age: number;
</script>
<h1>Hello {name} ({age})!</h1>
<p>
<Counter />
<Counter value={1}>Counter 1</Counter>
<Counter value={$count} step={3}>Counter 2</Counter>
</p>
```
Without the fix compiler throws:
```
(!) svelte plugin: 'count' is not defined
src/App.svelte
<Counter />
<Counter value={1}>Counter 1</Counter>
<Counter value={$count} step={3}>Counter 2</Counter>
^
</p>
```
Relates to:
- PaulMaly#4
- microsoft/TypeScript#9191
0 commit comments