You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Everything works perfectly while developing. But after building I get
Uncaught ReferenceError: global is not defined
at vendor.f5fc9a77.js:31
Tracking down the error shows that it has to do with popper.js which is used by v-tooltip. Obviously it is not meant to be used in a worker context. But because the worker imports another library, which is also built into the vendor chunk, it is being executed on the worker.
Reproduction
Here you can find a minimal project reproducing the issue. v-tooltip is used in some component and the worker imports another library (doesn't matter which one).
I can't seem to reproduce this. The repro worked fine for me without any errors, perhaps something was fixed in popperjs? Or perhaps the recent web workers improvement in Vite had fixed this. I'll close this for now, but feel free to let me know if the issue still persists and provide a repro along side.
Describe the bug
Everything works perfectly while developing. But after building I get
Tracking down the error shows that it has to do with popper.js which is used by v-tooltip. Obviously it is not meant to be used in a worker context. But because the worker imports another library, which is also built into the vendor chunk, it is being executed on the worker.
Reproduction
Here you can find a minimal project reproducing the issue. v-tooltip is used in some component and the worker imports another library (doesn't matter which one).
https://gitlab.com/synphonyte/viteWorkerIssue
Run
vite build
and serve the resulting files in folderdist
. You will the see the above mentioned error in the browsers dev tools.System Info
Output of
npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers
:Used package manager: yarn
The text was updated successfully, but these errors were encountered: