Skip to content
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

Make Inter font paths relative. #20040

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

emikulic
Copy link

@emikulic emikulic commented Dec 4, 2021

Currently, paths look like /fonts/Inter which is fine if Element is installed in the wwwroot.
This change makes the paths relative (./fonts/Inter) which helps when it's not.

Credit goes to @rkfg.

Fixes #17575.


This change is marked as an internal change (Task), so will not be included in the changelog.

Currently, paths look like /fonts/Inter which is fine if Element is installed in the wwwroot.
This change makes the paths relative (./fonts/Inter) which helps when it's not.

Credit goes to @rkfg.

Fixes element-hq#17575.
@emikulic emikulic requested a review from a team as a code owner December 4, 2021 07:17
@SimonBrandner SimonBrandner added the T-Task Tasks for the team like planning label Dec 4, 2021
Copy link
Contributor

@germain-gg germain-gg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for raising that concern. It appears that you're not the only one to face this issue as I can see some reverse proxy rules on some config that deal exactly with that.

I'm not convinced that this the approach I'd want us to take to fix this particular problem. Dabbling with the HtmlWebpackConfig sounds a bit more maintanable and will convey the intent a bit better.

It appears that the path or publicPath option seems to achieve what you're after.
I'd also be curious to understand why this is an issue for this scenario and not for the JavaScript bundles

@emikulic
Copy link
Author

emikulic commented Dec 7, 2021

curious to understand why this is an issue for this scenario and not for the JavaScript bundles

This = fonts?

Looking at DevTools, with Element 1.9.5 everything loads fine (so I guess via relative paths) except for these fonts.

@germain-gg
Copy link
Contributor

yes, this = fonts
I believe a more maintainable fix is to understand how to make webpack return relative paths rather than tweaking the index.html like it's been suggested in this pull request

@emikulic
Copy link
Author

emikulic commented Dec 8, 2021

That's fair enough. I don't know how to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Task Tasks for the team like planning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inter font paths are absolute
3 participants