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

Webpack font's wrong publicPath when building #28

Open
seanenriquez opened this issue Apr 15, 2021 · 0 comments
Open

Webpack font's wrong publicPath when building #28

seanenriquez opened this issue Apr 15, 2021 · 0 comments

Comments

@seanenriquez
Copy link

I noticed that when i tried to build anything, even a fresh clone of the repo, the fonts would never get picked up in the correct location.

This is due to the exports.loadFonts rule in webpack.parks.js needing to be changed to this:

use: {
  loader: 'file-loader',
  options:{
    publicPath:'../fonts/',
    outputPath:'fonts/',
    ...options
  }
}

I believe the issue is that @font-face SCSS serves up a relative URL that's based on where the CSS is output instead of where it's pointing during development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant