anthonygore / html-critical-webpack-plugin

A webpack plugin that will extract critical CSS. Now supports Webpack v4.
MIT License
446 stars 38 forks source link

inline fonts path is wrong #24

Open ronjb04 opened 6 years ago

ronjb04 commented 6 years ago

its showing ../../../username/appData/fonts/fontname.woff and etc..

any workaround for this?

If i disable the html-critical-webpack-plugin, the fonts path are proper.

below is my font.css

@font-face {
  font-family: 'fontname';
  src: url('../assets/fonts/fontname.eot');
  src: url('../assets/fonts/fontname.eot?#iefix') format('embedded-opentype'),
       url('../assets/fonts/fontname.woff2') format('woff2'),
       url('../assets/fonts/fontname.woff') format('woff'),
       url('../assets/fonts/fontname.ttf') format('truetype'),
       url('../assets/fonts/fontname.svg#fontname') format('svg');
  font-weight: 600;
  font-style: normal;
}

I hope someone could suggest a solution or a workaround.

Thanks

thescientist13 commented 6 years ago

Thanks @ronjb04 , but it's hard for me to envision what you're describing going on what you've provided.

Could you please provide more information, like

Even better would be a simple test case to reproduce the issue. 🌟

Thanks!