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

Investigation #2

Closed
kresnasatya opened this issue Nov 2, 2024 · 3 comments
Closed

Investigation #2

kresnasatya opened this issue Nov 2, 2024 · 3 comments

Comments

@kresnasatya
Copy link
Collaborator

kresnasatya commented Nov 2, 2024

Command tsc && vite build will throw error for Svelte TS.

@kresnasatya
Copy link
Collaborator Author

It's a Inertia package problem. Submitted in: inertiajs/inertia#2075

@edjw
Copy link
Contributor

edjw commented Nov 4, 2024

I think it was because of not checking for the existence of el in app.ts

@kresnasatya
Copy link
Collaborator Author

kresnasatya commented Nov 9, 2024

Hi Ed, sorry for late reply. You're right. But, if we add a checker into the app.ts file then the code program will be increased a bit. If we check in Laravel Breeze (Inertia Vue & React) it doesn't add any check of el.

Inertia + Vue TS: https://github.com/laravel/breeze/blob/a6d02b0ad5a03e7ab12546bf978be33e5c77f806/stubs/inertia-vue-ts/resources/js/app.ts#L19

Inertia + React TS: https://github.com/laravel/breeze/blob/a6d02b0ad5a03e7ab12546bf978be33e5c77f806/stubs/inertia-react-ts/resources/js/app.tsx#L18

My intuition towards on the Inertia Svelte package itself in this code: https://github.com/inertiajs/inertia/blob/9106d74495130a3d82d00daec43c4042b81bdb63/packages/svelte/src/createInertiaApp.ts#L14

The author do that because of PR inertiajs/inertia#2037

Anyway, let the el checker exist in the app.ts in this moment. I will close this issue. Thank you.

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