Skip to content

inertia:install generator for Typescript uses vite_javascript_tag on the application layout #218

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

Open
Andy9822 opened this issue Apr 14, 2025 · 0 comments · May be fixed by #217
Open

inertia:install generator for Typescript uses vite_javascript_tag on the application layout #218

Andy9822 opened this issue Apr 14, 2025 · 0 comments · May be fixed by #217

Comments

@Andy9822
Copy link
Contributor

Andy9822 commented Apr 14, 2025

When running bin/rails generate inertia:install with TypeScript, the generated layout still uses:

<%= vite_javascript_tag "application" %>

However, the inertia pack is correctly added using:

<%= vite_typescript_tag "inertia" %>

This inconsistency is confusing—especially since there's a comment in the layout suggesting to use vite_typescript_tag. A developer might update application to use it, which will fail, because the asset is still named application.js instead of application.ts.

To avoid confusion, the generator should configure everything to use TypeScript consistently when that option is selected.

Current behavior with typescript installation

Image
@Andy9822 Andy9822 changed the title `inertia:install generator for Typescript doesn't set up the application layout inertia:install generator for Typescript doesn't set up the application layout Apr 14, 2025
@Andy9822 Andy9822 linked a pull request Apr 14, 2025 that will close this issue
@Andy9822 Andy9822 changed the title inertia:install generator for Typescript doesn't set up the application layout inertia:install generator for Typescript uses vite_javascript_tag on the application layout Apr 14, 2025
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

Successfully merging a pull request may close this issue.

1 participant