Skip to content

@url import for fonts makes relative requests #113

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

Closed
haf opened this issue Jul 20, 2015 · 1 comment
Closed

@url import for fonts makes relative requests #113

haf opened this issue Jul 20, 2015 · 1 comment

Comments

@haf
Copy link

haf commented Jul 20, 2015

I have a piece of code:

@font-face {
  font-family: 'Roboto Slab Light';
  src: url('../fonts/RobotoSlab-Light.ttf');
}

That gets translated to [hash].ttf; now, because I'm using the history-API, the request to the ttf becomes for example accounts/[hash].ttf where hash is a hex-string. Can I make the loader output paths that are absolute? (if I make them absolute in the css, they are ignored like the docs say)

@haf haf closed this as completed Jul 20, 2015
@haf
Copy link
Author

haf commented Jul 20, 2015

Use:

"output": { "publicPath": "/" }

To tell webpack not to be relative.

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