an image of a forest and water

... 6 hours later

After 6 or 6.5 hours or trying to get Rollup and Stellar-SDK to try to play nice together I gave up. Went back and tried creating a svelte-webpack template from the ground up. After getting the base template set up and multiple stabs at getting Webpack configured to match some of the functionality in the default Svelte template I was finally able to get the Stellar-SDK showing me the version number in the UI. 

What a royal pain in the ass. The only other good to come of it is now I have a base template for Svelte using Webpack on GitHub.

To use it, with node and npm installed:

npx degit sumwatt/svelte-webpack svelte-app
cd svelte-app && npm install

Once the install is complete:

npm run dev

This should get you to the Hello World page. This is a fairly stripped down version from the official Svelte-Webpack template. Sometimes it works a little better if you strip everything back down to the basics and build it back up.

This article was updated on 6 Nov 2021