Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<script module> exports aren't recognised #2472

Closed
Rich-Harris opened this issue Aug 22, 2024 · 0 comments · Fixed by #2473
Closed

<script module> exports aren't recognised #2472

Rich-Harris opened this issue Aug 22, 2024 · 0 comments · Fixed by #2473
Labels
bug Something isn't working

Comments

@Rich-Harris
Copy link
Member

Describe the bug

image

Reproduction

in a fresh SvelteKit project with Svelte 5 selected:

<!-- src/lib/Component.svelte -->
<script lang="ts" module>
  export function myFn(param: string) {
    return param + 'pam' + 'pam';
  }
</script>
<!-- src/routes/+page.svelte -->
<script lang="ts">
  import { myFn } from '$lib/Component.svelte';
</script>

<h1>{myFn('whee')}</h1>

Expected behaviour

for it to work

System Info

  • OS: MacoS
  • IDE: VSCode

Which package is the issue about?

Svelte for VS Code extension

Additional Information, eg. Screenshots

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant