webcontainer-core
webcontainer-core copied to clipboard
Typescript `compilerOptions.types` doesn't apply types
Describe the bug
I can't reference a different typescript declaration when it exists in node_modules.
Link to the blitz that caused the error
https://stackblitz.com/edit/vitejs-vite-ymbqrc?file=src%2FApp.tsx
Steps to reproduce
- Spin up a new typescript + react project
- Update to latest canary
- Add
"types": ["react/canary"]tocompilerOptionsintsconfig.json - Try to access a API that exists only in React canary and not stable
Expected behavior
react/canary.d.ts should be applied
Parity with Local
- [X] I have run the project in my local machine and I could not reproduce the issue.
Screenshots
Platform
Browser name = Chrome
Full version = 124.0.0.0
Major version = 124
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
performance.memory = {
"totalJSHeapSize": 116357453,
"usedJSHeapSize": 93883557,
"jsHeapSizeLimit": 4294705152
}
Hash = 41fbae16
Additional context
No response
/// <reference types="react/canary" />
Works as a workaround