Skip to content
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

Scaffolding in a project using react and typescript generates .jsx files in app/frontend/pages #27

Closed
mpressen opened this issue Nov 28, 2024 · 3 comments

Comments

@mpressen
Copy link

It should generate .tsx files instead.

At the moment, if I don't rename manually those files, my app breaks (page is undefined in my inertia entrypoint, as it looks for .tsx extension for pages)

@mpressen mpressen changed the title Scaffolding in a project using react and typescript still generate .jsx files in app/frontend/pages Scaffolding in a project using react and typescript generates .jsx files in app/frontend/pages Nov 28, 2024
@skryukov
Copy link
Owner

@mpressen thanks for the issue!

You're correct - TypeScript scaffolds are not supported in the release version. However, we've just merged the upstreamed generators with full TypeScript support into the core repository: inertiajs/inertia-rails#158

While we plan to release a new version of the core gem this week, you can use this temporary solution:

# Gemfile

- gem 'inertia_rails-contrib'
+ gem 'inertia_rails', github: 'inertiajs/inertia-rails'

@mpressen
Copy link
Author

mpressen commented Nov 28, 2024

Allright ! With the docs and now generators being merged in 'inertia_rails' as well, what is the future looking like for 'inertia_rails-contrib' ? I see a great PR for integrating inertiaui/modal (I'll probably test it soon), but I 'm curious :p.

Thanks for all the great work

@skryukov
Copy link
Owner

Good question. I think we'll keep it as a place for experimental features that shouldn't go into the core (like modal support). Will see 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants