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

Does not add dynamic base path to fonts with .woff extension #4

Closed
darkangel081195 opened this issue Mar 22, 2022 · 5 comments
Closed
Labels
enhancement New feature or request

Comments

@darkangel081195
Copy link

#Issue
The plugin is not adding dynamic base path to font files with woff extenstion.

#Steps to Reproduce

  1. Created a sample vue 3 project with font file present inside public/fonts
  2. Build the project and run the preview
  3. Checking network tab, font files are loaded without base path
@chenxch
Copy link
Owner

chenxch commented Mar 23, 2022

I will deal with your feedback later. If you are more urgent, you can try to put the woff file in the src directory. I'll let you know when the fix is complete.

@chenxch chenxch added the enhancement New feature or request label Mar 23, 2022
@chenxch
Copy link
Owner

chenxch commented Mar 23, 2022

I have conducted related tests, woff can be loaded normally. If it is convenient, you can provide a demo.

@darkangel081195
Copy link
Author

darkangel081195 commented Mar 23, 2022

@chenxch I will work on creating a reproducible repo in parallel. But just as a note, issue is when we are trying to load a font file present in public folder.

// index.scss
@font-face {
font-family: "Ionicons";
src: url('/fonts/ionicons.woff') format("woff");
font-weight: normal;
font-style: normal;
}

the file mentioned in above url is present under public /fonts so after build it is available from dist .

Thanks.

@chenxch
Copy link
Owner

chenxch commented Mar 24, 2022

Are you sure that index.scss loads correctly into ionicons.woff? Shouldn't the path point to public/fonts/ionicons.woff? First of all, you have to make sure that the relative path is correct, not that it is compiled in the dist path.

@chenxch
Copy link
Owner

chenxch commented Mar 25, 2022

@darkangel081195 Has your issue been resolved?

@chenxch chenxch closed this as completed Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants