histoire icon indicating copy to clipboard operation
histoire copied to clipboard

Histoire cannot collect stories in Svelte, Vite app

Open ctp-placebo opened this issue 1 year ago • 3 comments

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

ctp-placebo avatar Apr 14 '23 13:04 ctp-placebo