-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Closed
Copy link
Description
Describe the bug
When running storybook via vuejs, currently the following shows up in the console
12:55:22 [vite] Pre-transform error: Failed to load url /sb-preview/runtime.js (resolved id: /sb-preview/runtime.js). Does the file exist?
This is due to a new pre-transform feature of vite 5 I think
Currently storybook does already add the following in to the vite config as part of builder-vite
build: {
rollupOptions: {
external: ['./sb-preview/runtime.js'],
}
}
What I think is also needed is the following
assetsInclude: ['/sb-preview/runtime.js'],
Fix pulled from the following
To Reproduce
pnpm create vue@latest
pnpm dlx storybook@latest init
System
Storybook Environment Info:
System:
OS: Windows 10 10.0.19045
CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz
Binaries:
Node: 20.8.0 - C:\Program Files\nodejs\node.EXE
npm: 10.2.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 8.12.1 - ~\AppData\Local\pnpm\pnpm.CMD <----- active
Browsers:
Edge: Spartan (44.19041.3570.0), Chromium (120.0.2210.77)
yunggarlic, thazhemadam, gregorypratt, zsoerenm, sahil143 and 36 more
Metadata
Metadata
Type
Projects
Status
Done