-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Cannot import from external URLs #4949
Comments
Thanks for the repro. FYI, Vite's SSR also doesn't support network imports yet: Interestingly, the issue on Vitest (vite-node) might be actually different since Vite gets an error during EDIT: Indeed, Vite side issue seems irrelevant. On Vitest, https://stackblitz.com/edit/vitest-dev-vitest-3ewr53?file=vite.config.ts export default defineConfig({
test: {
poolOptions: {
threads: {
execArgv: ['--experimental-network-imports'],
},
},
server: {
deps: {
external: [/^https:/],
},
},
},
}); |
Thank you for providing the workaround. Will it become the official solution, or will Vitest incorporate this logic internally? |
I think users should be still responsible for enabling vitest/packages/vite-node/src/externalize.ts Lines 97 to 100 in 0b28f30
|
Describe the bug
Vitest is not able to export from external URLs.
Reproduction
Working Vite Example: https://stackblitz.com/edit/vitejs-vite-krutmh
Nonworking Vitest Example: https://stackblitz.com/edit/vitest-dev-vitest-fn6bpu?file=src%2Fbasic.js
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: