SvelteJS Integration

Hello,

I am looking to see if there is any documentation for SvelteJS. I see the JS API integration but I wanted to confirm that is the correct way to go or if there are any other suggestions or recommendations. I am not crazy about what the docs say so could use a little help here! Thanks!

Hello! We don’t currently have any sort of documentation for Svelte at this point. Your best bet will be to use our Javascript documentation until we are able to put something together for Svelte. We hope to look into it and create some resources soon.

In the meantime, if you discover any useful tips for using Prismic & Svelte, then please share them with us here to help anyone else that might be looking to try this out as well. Thanks!

Will do, one of the ways I saw was using graphql-apollo which I will be trying that out with sapper (svelte’s server side framework)

@teddy That’s great, I can’t wait to hear how it goes for you. We’ll look into it as well at some point and try to put together some resources.

1 Like

Still no luck, whether it’s through apollo-graphql or even with the js workaround, could use some direction on this!

Interested in this as well

Hi @teddy and @johan.steinberg, I quickly put together a simple example of a Sapper site using Prismic. You can check it out here. Everything I know about Sapper & Svelte I learned today, so let me know if I’ve missed anything with this example. Hopefully it help you guys get started!

awesome! will take a look!

Working so far, however, I was hoping to see if there may be a GraphQL solution, which I think may be best since we are hoping to hand this off to a junior developer, but this is a great start and I appreciate it.

This is going to be a long term project. We have decided to go back to gatsbyjs as our outsourced team can do gatsby.

I will make this a personal priority project as I see a lot of potential for SvelteJS to be used and update as I can.

@teddy Sounds great, let us know if there is anything we can do to help :grinning: