You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
currently if you build histoire in the index.html for example it has lines of code like , if for instance you want to host his as a sub directory on the same domain it currently breaks.
so for instance if you want to host your histoire on a url like /stories it will look for the above stylesheet in /assets instead of /stories/assets
Suggested solution
add a config property "base url". that allows this to be hosted as a sub domain which will append this value to the base directory.
so with a base url value of "/stories" the still import above becomes /stories/assets/style instead of /assets/style
@theDevelopper that would be for the entire file. This would work if you are making a UI lib. But not if you have a base project that also makes use of historie. So ideally the historie build should have its own base path
@jpengelbrecht Yes, I do understand that. that's why you can override the base path in the histoire.config.js instead of the project's vite.config.js, as shown in my example. This way the base path is applied to Histoire and not the project itself.
At least in my project that works as expected.
Clear and concise description of the problem
currently if you build histoire in the index.html for example it has lines of code like , if for instance you want to host his as a sub directory on the same domain it currently breaks.
so for instance if you want to host your histoire on a url like /stories it will look for the above stylesheet in /assets instead of /stories/assets
Suggested solution
add a config property "base url". that allows this to be hosted as a sub domain which will append this value to the base directory.
so with a base url value of "/stories" the still import above becomes /stories/assets/style instead of /assets/style
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: