Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

doesn't work well with url-loader to load font #197

Open
hualu00 opened this issue Nov 13, 2017 · 3 comments
Open

doesn't work well with url-loader to load font #197

hualu00 opened this issue Nov 13, 2017 · 3 comments

Comments

@hualu00
Copy link

hualu00 commented Nov 13, 2017

I didn't remember changes related to this, however the url-loader fails suddenly with happypack.
Following is my current webpack config:

plugins: [
 new HappyPack({
      id: 'font',
      threads: 4,
      loaders: [ 'url-loader?limit=200000&mimetype=application/font-woff' ]
    }),
],
module: {
  rules: [
     {
        test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/,
        loader: 'happypack/loader?id=font'
     }
]
}

And here is how I use it,

@font-face {
  font-family: 'FontAwesome';
  src: url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff');
  font-weight: normal;
  font-style: normal;
}

result is, it doesn't work and give me warnings

Failed to decode downloaded font
OTS parsing error: incorrect file size in WOFF header

Any help ?

@MaelWeb
Copy link

MaelWeb commented Dec 22, 2017

I got the warning too

@wznonstop
Copy link

+1

@balovbohdan
Copy link

I also can't find resolving of this problem. Loading fonts without happypack.

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

No branches or pull requests

5 participants