Skip to content
This repository was archived by the owner on Aug 28, 2026. It is now read-only.
This repository was archived by the owner on Aug 28, 2026. It is now read-only.

@url import for fonts makes relative requests #113

Closed

Description

@haf

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)

Activity

  1. haf commented on Jul 20, 2015

    @haf
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions