Vite not transpiling imports in TypeScript worker imported using new Worker
.
#14535
Closed
7 tasks done
Labels
duplicate
This issue or pull request already exists
Describe the bug
When importing a TypeScript worker using
new Worker
without{type: 'module'}
, Vite will not transpile imports in the TypeScript module (Although it does injectimportScripts("/@vite/env")
, instead of an ESM import) which results in:Reproduction
https://stackblitz.com/edit/vitejs-vite-bthmfa?file=src%2Fmain.ts
Steps to reproduce
Open the reproduction and look at the console.
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: