Skip to content

2D Text font - trying fallback RangeError: offset is outside the bounds of the DataView #2994

Closed Answered by davidburchakov
davidburchakov asked this question in Q&A
Discussion options

You must be logged in to vote

The solution

font={process.env.PUBLIC_URL +"/bangers.woff"}

To target the public directory, I need to use
process.env.PUBLIC_URL

More about using the public folder in react:
https://create-react-app.dev/docs/using-the-public-folder/#adding-assets-outside-of-the-module-system

Answered before:
https://stackoverflow.com/questions/71189191/access-files-in-public-directory-after-production-create-react-app

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by davidburchakov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant