-
-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
histoire svelte doesn't include static files #334
Comments
Please provide a runnable reproduction, thanks! |
https://github.com/MarcDAFrame/HistoireStaticBugReproduction
this is because
|
For me adding: const config: UserConfig = {
// This is for histoire
publicDir: "static",
} to my vite.config.ts fixed this problem, although sveltekit complains that this settings gets overwritten. |
This should probably be fixed with #232 |
I would be surprised if #232 fixed this. https://github.com/histoire-dev/histoire/blob/main/packages/histoire-plugin-svelte/src/index.ts does not set I'd also note however, that you rarely want to use the |
@benmccann |
Hmm looks like some necessary config is set in |
I didn't think |
Although thinking about this more, if a user references static files in their components, I'm not sure how those components end up being distributable. If you |
Describe the bug
files in image tags can be referrenced like the following in svelte
Histoire doesn't return that file. However, it does return a file at
/static/dir/file.png
Reproduction
create an image tag with a
src="/dir/file.png"
image the static folder, create a histoire story, import the svelte component with the image tag. The image does not load. now prepend the src path withstatic/
and the image wil load in HistoireSystem Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: