Original built with Gatsby & Netlify
This version using SvelteKit & GitHub Pages
- clone project
npm install
npm run dev
- start developing
npm run build
The project has a base path set for hosting on GitHub Pages in svelte.config.js
The preview of the build via npm run preview
won't work because of the base path
npm run storybook
There still seem to exist various problems using Storybook with SvelteKit.
To make the initial installation work:
{ "type": "commonjs" }
in.storybook/package.json
"preprocess": import(...)
in.storybook/main.js
Problems:
- Only "Svelte JS" syntax seems possible, not "Svelte NATIVE-FORMAT"
- for Components with aliased imports (
Header.svelte
,Footer.svelte
,...) further adjustments needed storybookjs/storybook#14952
This was a great exercise for learning a bit more about SvelteKit, get an impression of Storybook, use GitHub Actions for the first time and also train basic HTML & CSS stuff.