Closed
Description
Describe the bug
Having multiple script
tags with async
functions in them results in the error:
[rollup-plugin-dynamic-import-variables] Identifier '__awaiter' has already been declared (26:9)
Logs
N/A
To Reproduce
<script context="module" lang="ts">
async function fnA() {}
</script>
<script lang="ts">
async function fnB() {}
</script>
<h1>This breaks</h1>
Expected behavior
I expect the page to build and render.
Stacktraces
N/A
Information about your SvelteKit Installation:
Diagnostics
System:
OS: macOS 11.3.1
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 111.69 MB / 32.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node
npm: 6.14.13 - ~/.nvm/versions/node/v14.17.0/bin/npm
Browsers:
Firefox: 88.0.1
Firefox Developer Edition: 89.0
Safari: 14.1
npmPackages:
@sveltejs/adapter-node: ^1.0.0-next.22 => 1.0.0-next.22
@sveltejs/kit: next => 1.0.0-next.109
svelte: ^3.34.0 => 3.38.2
Severity
Fairly severe. This prevents me from having an async load
function and an async page-level function (like a form submit) in the same file. Thankfully I don't need that yet, but it's only a matter of time.
Additional context
N/A