"is not exported" when importing CJS library from worker, but not outside worker #18789
Closed
7 tasks done
Labels
p4-important
Violate documented behavior or significantly improves performance (priority)
regression
The issue only appears after a new release
Describe the bug
I tried to upgrade https://github.com/jakebailey/esbuild-playground to vite v6, but hit an issue with a CJS library I use in a worker. It looks like vite (or rollup?) can't find one of the exports, while vite v5 can.
Notably, doing the same import but not in a worker seems to operate correctly. It also works fine in dev mode.
I've created a minimal repro on stackblitz, included below, along with logs that are just in that stackblitz.
Reproduction
https://stackblitz.com/edit/vitejs-vite-cc7pyv?file=src%2Fmain.ts&view=editor
Steps to reproduce
npm install
npm run build
System Info
Used Package Manager
npm
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: