#What's happening under the hood? (Top level await question)
1 messages · Page 1 of 1 (latest)
From my understanding there are two requirements for top level await to work
- tsconfig target should be a target that support esnext (e.g: esnext)
2.vite build target should have a target that support top level await
The build target is used when building, the tsconfig is used for both local dev & building
https://stackblitz.com/edit/vitejs-vite-sxnf5a?file=vite.config.ts
That's really useful, thanks. What target is used for dev if the entry point is a js file rather than a ts one?