-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
fonts in meteor /public directory #268
Labels
Comments
Yes. I can understand the pain. Looking for some ideas to get around with this. |
We are going to fix this with #344. |
This was referenced Aug 11, 2020
Closed
This was referenced Nov 25, 2020
Closed
Closed
This was referenced Dec 6, 2020
Closed
Closed
This was referenced Jun 30, 2021
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi guys,
I have fonts in the /public directory of meteor, say in /public/fonts/myfont.ttf
I now declare font-face in a scss file like this:
Using absolute paths like above works fine locally in meteor and in storybook.
However, if i publish this to github pages (to company.github.io/myproject/), the fonts will not load, because they are resolved to company.github.io/fonts/myfont.scss instead of company.github.io/myproject/fonts/myfont.scss.
I therefore tried to change to relative paths, but i did not manage to have a setup, where every three environments work.
In particular webpack complains about not finding the font during build-time, when i pass a relative path. But i don't understand why webpack even tries to resolve these paths...
I also tried to add to head.html in .storybook-folder,
but this will break loading js files for the static storybook.But fonts get still loaded from the parent directory.Any idea how to deal with this?
The text was updated successfully, but these errors were encountered: