Skip to content

Fix types in Svelte adapter #2005

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

Merged
merged 2 commits into from
Oct 9, 2024
Merged

Fix types in Svelte adapter #2005

merged 2 commits into from
Oct 9, 2024

Conversation

pedroborges
Copy link
Collaborator

  • Make setup callback optional for when in SSR mode

  • Export ResolvedComponent type to be used in the resolve callback:

    createInertiaApp({
        resolve: (name) => resolvePageComponent(
            `./Pages/${name}.svelte`,
            import.meta.glob<ResolvedComponent>('./Pages/**/*.svelte')
        ),
        setup({ el, App }) {
            mount(App, { target: el})
        },
    })

@reinink reinink merged commit 2e93156 into v1 Oct 9, 2024
7 checks passed
@reinink reinink deleted the fix-types branch October 9, 2024 18:16
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 this pull request may close these issues.

2 participants