patternfly / patternfly/patternfly-react-seed
Can't find fonts when serving from a non-root path
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 97
- Forks
- 282
- PR merge metrics
- No merged PRs in 30d
Description
Use case is to take the files generated in dist/ and put them on a webserver in a non-root path.
The error I encounter when doing this is that the patternfly fonts, specified in the main.css use a url(/fonts/...) path, which forces the browser to look at the root, rather than relative to the base path.
Is there anyway to update webpack to change this?
Jira Issue: PF-2028
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the webpack configuration and the generated files in dist/, especially dist/main.css and its font URLs. Reproduce serving the output from a non-root path, then trace how webpack emits the PatternFly font paths. Done means the generated CSS resolves those fonts correctly under a non-root base path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript, webpack
- Domain
- build-system, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100