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
By logic, for the following staticDirs all its subfolders should be set up as URLs of /: staticDirs: ["../public"],.
So, it should be / for root (public) and /fonts for subfolder(public/fonts).
Well, any subfolder of public becomes /public/*.
It is especially important when working with next/fonts since Storybook is looking to import the fonts from /fonts, making it unable to load fonts properly, see this issue: #19711 (comment).
Describe the bug
By logic, for the following
staticDirs
all its subfolders should be set up as URLs of/
:staticDirs: ["../public"],
.So, it should be
/
for root (public
) and/fonts
for subfolder(public/fonts
).Well, any subfolder of
public
becomes/public/*
.It is especially important when working with next/fonts since Storybook is looking to import the fonts from
/fonts
, making it unable to load fonts properly, see this issue: #19711 (comment).As a workaround we use:
Altogether with our decorator, it works. But this solution conflicts with
msw-storybook-addon
which looks for the worker file on the root URL.To Reproduce
staticDirs
:http://localhost:6006/public/fonts/TRT-Bold.woff2
, removepublic/
from that URL, and you will get the font loaded.System
Additional context
It is related to this issue and it is especially important we are working with next/fonts, see here.
The text was updated successfully, but these errors were encountered: