Sveltekit & SnipCart

I am trying to incorporate snipcart in my sveltekit project and during testing it will initially work but then after a few saves just throws “ReferenceError: window is not defined”. I was looking at the NEXTjs tutorial and saw that snipcart was implemented completely different than the docs. Any direction for a novice dev would be super helpful. Thanks ahead of time for your time.

Hey @OneFJef

Since Snipcart version 3.4.0 we changed the way to “install” Snipcart on your website. But basically, you don’t need to explicitly load CSS and Js.

You can simply add the installation snippet from our doc and you’ll be all set!

Cheers,

Unfortunately that install snippet is what the initial issue is revolving around.