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
If you pass in a non-string into an import statement when using Vitest, you'll get a cryptic "id.startsWith is not a function" message. I think this is due to the custom __vite_ssr_dynamic_import__() function that seems to replace all import() stuff not properly doing myArg = `${myArg}`; like browsers and Node.js do natively to make sure the arg is a true string.
### Used Package Manager
npm
### Validations
- [X] Follow our [Code of Conduct](https://github.com/vitest-dev/vitest/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guidelines](https://github.com/vitest-dev/vitest/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://vitest.dev/guide/).
- [X] Check that there isn't [already an issue](https://github.com/vitest-dev/vitest/issues) that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitest-dev/vitest/discussions) or join our [Discord Chat Server](https://chat.vitest.dev).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
The text was updated successfully, but these errors were encountered:
Describe the bug
If you pass in a non-string into an import statement when using Vitest, you'll get a cryptic "id.startsWith is not a function" message. I think this is due to the custom
__vite_ssr_dynamic_import__()
function that seems to replace allimport()
stuff not properly doingmyArg = `${myArg}`;
like browsers and Node.js do natively to make sure the arg is a true string.Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-mamgrv?file=test%2Fbasic.test.ts
System Info
The text was updated successfully, but these errors were encountered: