DEV Community

Discussion on: Svelte + Tailwind + Storybook Starter Template

Collapse
 
smokeyfro profile image
Chris Rault

Anyone else getting "Uncaught SyntaxError: Unexpected token '<'" when trying to launch the Svelte app? I followed the instructions to a T and can see Storybook is working fine, but both the bundle.css and bundle.js are outputting the app's html.

Collapse
 
jerric profile image
Jerric Lyns John

Did you try running the code in the repo? Also can you share the error details?

Collapse
 
smokeyfro profile image
Chris Rault

Hi Jerric :) I decided to start over and the 2nd time round everything is working fine. Not sure where I went wrong before.

On an unrelated note, what would be the best way to add Sapper to the project? All the examples I've seen recommend starting with the Sapper template, but not anything about adding to existing templates.

TIA!

Thread Thread
 
jerric profile image
Jerric Lyns John

It can be done, but trust me going the template way is the best, you'll have to deal with both server side and client side dependencies. It's faster and straightforward with the template.

If you wanna add tailwind, just make sure you add the preprocess in both client and server side in the rollup config. To add story book it's the same process as mentioned in the blog here.