histoire
histoire copied to clipboard
Histoire cannot collect stories in Svelte, Vite app
Describe the bug
I'm having a problem with a project scaffolded with npm create vite@latest
using Svelte as the template when scaffolding.
No Nuxt or Vue like the recently closed (but not fixed for me! issue).
The template includes a component for a button to +1, Counter.svelte, very simple so no errors, and Histoire cannot find it.
The story file is simple, looks like this:
<svelte:options tag="cobalt-counter-hst" />
<Hst.Story title="Counter"> <Counter /> </Hst.Story>
Histoire itself opens on localhost with the sidebar etc, just can't collect any stories.
Missig some congif or? Have followed the docs to the letter.
Ubuntu 22.10 LTS npm: '9.6.2', node: '18.16.0',
Reproduction
Reproduced in stackblitz. $ npm run story:dev to see the error.
https://stackblitz.com/edit/vitejs-vite-cycwey?file=svelte.config.js
System Info
System:
OS: Linux 5.19 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
Memory: 1.03 GB / 7.53 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
npmPackages:
@histoire/plugin-svelte: ^0.16.1 => 0.16.1
histoire: ^0.16.1 => 0.16.1
vite: ^4.2.0 => 4.2.1
Used Package Manager
npm
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- [X] The provided reproduction is a minimal reproducible example of the bug.