-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with Worker that imports sth from vendor chunk #3041
Comments
try following this comment #2618 (comment) |
Thanks for the tip! Unfortunately it didn't change anything in my case. |
Maybe try adding |
I can't seem to reproduce this. The repro worked fine for me without any errors, perhaps something was fixed in |
We are no longer splitting the vendor chunk by default, so that may be the reason it works now |
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: