tomblachut / svelte-intellij

Svelte components in WebStorm and friends
MIT License
485 stars 38 forks source link

Add support for `context="module"` #296

Closed petermakeswebsites closed 1 year ago

petermakeswebsites commented 2 years ago

Looks like there is no proper support for module context so I'm throwing this in here to put on the to-do list

Example.svelte

<script lang="ts" context="module">
import { writable } from "svelte/store"
export const animal = writable("tiger")
</script>
Animal is a {$animal}

Second.svelte

<script lang="ts">
import { animal } from "Example.svelte" // Cannot resolve symbol 'headerAnimationsReady'
</script>
Imported animal is a {$animal}
r00t3g commented 2 years ago

Looks like dupe https://github.com/tomblachut/svelte-intellij/issues/241

tomblachut commented 1 year ago

Migrated to WEB-54714 Svelte: modules exported from a 'context="module"' script block of the other component not resolved