-
Notifications
You must be signed in to change notification settings - Fork 26k
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
TypeScript JSX support for _document #3511
Comments
To be fair, this would not work if using ".jsx" without typescript also. |
You can try using |
@corydeppen thanks, already doing that. But in canary "jsx" support is one of the items. Might make sense to extend that so it supports JSX for anything in pages. |
You mentioned you were using I'm on I apologize if I'm misunderstanding the issue. |
I was using "react-native" with 4.2.1, but with the release of 4.3.0 "JSX support" was added. So, switched to "preserve" as it makes more sense to use "preserve" than "react-native". "preserve" will produce a _document.jsx instead of _docuemnt.js. Since 4.3 supports JSX, it would make sense that it would support _document.jsx as part of that, therefore allowing users to use "preserve" without confusion or later needing to switch back to "react-native". |
Yeah, this is a bug, good catch! Will add a label for now and fix it later on 👍 |
If using TypeScript with "preserve" which generates "jsx" files, you cannot define _document as the framework looks for a _document.js and not _document.jsx.
The text was updated successfully, but these errors were encountered: