-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add .jsx and .tsx support (Edit: .tsx is already supported) #200
Comments
I thought they were already? https://github.com/abcnews/aunty/blob/main/src/generators/project/templates/react/src/components/App/index.tsx |
Ahh yes my mistake .tsx seems to be implemented, but not .jsx Probably not overly urgent, but .jsx support could be sort of easy to implement I also noticed a strange bug where if you generate a project and NOT choose TypeScript it adds this in your index.js file which includes if (module.hot) {
module.hot.accept('./components/App', () => {
try {
renderApp();
} catch (err: any) {
import('./components/ErrorBox').then(({ default: ErrorBox }) => {
root.render(<ErrorBox error={err} />);
});
}
});
} |
Yeah, so you'd just rename with the new extension if |
It seems to be becoming a standard now that any JavaScript and TypeScript files that contain JSX syntax have the full
.jsx
or.tsx
so I'm suggesting we update our React and Preact templates to use these filenames and add import support to WebPack (I don't think it handles these file types currently).The text was updated successfully, but these errors were encountered: