Skip to content

Commit

Permalink
fix(scan): 'for await' support in script setup for dev server (#3889)
Browse files Browse the repository at this point in the history
  • Loading branch information
trebler committed Jun 23, 2021
1 parent 615a022 commit dd46cd1
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions packages/vite/src/node/optimizer/scan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,6 @@ function esbuildScanPlugin(
}
}

// <script setup> may contain TLA which is not true TLA but esbuild
// will error on it, so replace it with another operator.
if (js.includes('await')) {
js = js.replace(/\bawait(\s)/g, 'void$1')
}

if (
loader.startsWith('ts') &&
(path.endsWith('.svelte') ||
Expand Down

0 comments on commit dd46cd1

Please sign in to comment.