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
feat: web worker support #726
Conversation
✔️ Deploy Preview for vitest-dev ready! 🔨 Explore the source changes: 03117cf 🔍 Inspect the deploy log: https://app.netlify.com/sites/vitest-dev/deploys/623269d0ab01a1000849f464 😎 Browse the preview: https://deploy-preview-726--vitest-dev.netlify.app |
Emmm, interesting. I think I'd prefer to have it separate from the core to avoid the complexity and also could be a playground to dogfooding out programmatic/plugin API |
What do you think about something like this:
We can also just expose some kind of function like |
…remove getVitestRunnerOptions
In the end I decided that using |
I also moved |
@poyoho I am very confused why CI is failing. It says |
yes, I'm having a problem with positioning 🙈 |
when build the so @sheremet-va you can add this dts in import type { WorkerGlobalState } from './types'
declare global {
let __vitest_worker__: WorkerGlobalState
} |
@antfu it failes on build, that's what I've been trying to tell you. It failes because I export |
@antfu CI is failing. TBH this PR is taking so long just because of this change with global |
I will handle that when we are preparing the release of v0.7 |
Not sure if this should be part of the core, since usual DOM APIs are enabled with envs
Maybe we can enable some kind of presets, like
@vitest/frontend
withhappy-dom, worker
by default, or just publish this as a different packageCloses #722