We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@vitest/web-worker does not allow to test web-workers
The test fails immediately with the following error:
Error: `new URL(url, import.meta.url)` is not supported in SSR.
https://stackblitz.com/edit/vitest-dev-vitest-wn53bu?file=vite.config.ts
System: OS: macOS 12.4 CPU: (10) x64 Apple M1 Max Memory: 3.91 GB / 64.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.13.0 - ~/.nvs/default/bin/node Yarn: 1.22.17 - ~/.nvs/default/bin/yarn npm: 8.1.3 - ~/.nvs/default/bin/npm Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman Browsers: Brave Browser: 103.1.40.107 Chrome: 103.0.5060.53 Chrome Canary: 105.0.5146.0 Edge: 103.0.1264.44 Firefox: 99.0 Firefox Developer Edition: 102.0 Safari: 15.5 Safari Technology Preview: 15.4 npmPackages: vitest: ^0.17.0 => 0.17.0
yarn
The text was updated successfully, but these errors were encountered:
This is Vite compilation error. Please, make an issue in Vite repo.
In the meantime, you can rewrite it as:
const baseUrl = import.meta.url new URL(url, baseUrl)
Sorry, something went wrong.
Although I think it's already fixed: vitejs/vite#8846
You might need to update to Vite 3.0.0-beta.6, or ask Vite team to back port it to Vite 2.
No branches or pull requests
Describe the bug
@vitest/web-worker does not allow to test web-workers
The test fails immediately with the following error:
Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-wn53bu?file=vite.config.ts
System Info
Used Package Manager
yarn
Validations
The text was updated successfully, but these errors were encountered: