Skip to content

Vscode extension compile button doesn't work with async svelte #2857

@hanielu

Description

@hanielu

Describe the bug

When using async svelte, clicking on the Svelte: Show Compiled Code doesn't show the correct compiled output, I get this error on the extension host output

Image

Reproduction

Try clicking this button

Image

when on a svelte file with this code

<script lang="ts">
	const wait = (ms: number) => new Promise((res) => setTimeout(() => res("Hey"), ms));
	const result = await wait(1000);
</script>

{result}

Expected behaviour

I expect the compiled output to show and be correct

System Info

System:
OS: macOS 26.0
CPU: (12) arm64 Apple M2 Max

IDE: VSCode

Which package is the issue about?

Svelte for VS Code extension

Additional Information, eg. Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions