histoire-dev / histoire

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

Histoire config object in Vite config breaks when using HstVue #670

Closed t0byman closed 4 months ago

t0byman commented 4 months ago

Describe the bug

On https://histoire.dev/guide/config.html it says The second option is to provide the Histoire config object directly in your Vite config file vite.config.{js,ts}. but you can't do this when you use HstVue. You'll get this error:

✘ [ERROR] "@histoire/plugin-vue" resolved to an ESM file. ESM file cannot be loaded by `require`. See http://vitejs.dev/guide/troubleshooting.html#this-package-is-esm-only for more details. [plugin externalize-deps]

Reproduction

https://stackblitz.com/edit/histoire-vue3-starter-hw9lmd?file=vite.config.ts

System Info

Not possible in StackBlitz

Used Package Manager

npm

Validations

stackblitz[bot] commented 4 months ago

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