Skip to content

Cannot load fonts in development environment #29

@trungdq88

Description

@trungdq88

I am trying to load custom font.

My component dir tree:

screenshot 2015-09-27 00 49 32

My _App.scss:

@font-face {
  font-family: 'SegoeUIRegular';
  src: url('./font/segoeui.eot');
  src: url('./font/segoeui.eot') format('embedded-opentype'),
  url('./font/segoeui.woff') format('woff'),
  url('./font/segoeui.ttf') format('truetype'),
  url('./font/segoeui.svg#SegoeUIRegular') format('svg');
}

App.jsx:

import styles from './_App.scss';
...

In development environment, the font request looks like it is sent to a wrong URL:
screenshot 2015-09-27 00 45 56

screenshot 2015-09-27 00 46 23

This does not happen on production code, only in development (with npm start command).

Please help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions