histoire-dev / histoire

⚡ Fast and beautiful interactive component playgrounds, powered by Vite
https://histoire.dev
MIT License
3.15k stars 184 forks source link

Module import undefined only when using histoire #637

Open codewithcheese opened 9 months ago

codewithcheese commented 9 months ago

Describe the bug

An issue with importing the marked module. Works fine in vite. In histoire it is undefined

import { marked } from "marked";

Reproduction adds marked import and usage to src/routes/Counter.svelte to Sveltekit demo starter

Reproduction

https://stackblitz.com/edit/sveltejs-kit-template-default-dk4bpf?file=src%2Froutes%2FCounter.svelte

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.18.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.4.2 - /usr/local/bin/npm
    pnpm: 8.10.5 - /usr/local/bin/pnpm
  npmPackages:
    @histoire/plugin-svelte: ^0.17.4 => 0.17.4 
    histoire: ^0.17.5 => 0.17.5 
    vite: ^4.4.2 => 4.5.0

Used Package Manager

npm

Validations

stackblitz[bot] commented 9 months ago

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.