4/3/2023 0 Comments Fontawesome webfont eot![]() ![]() There are other articles on this solution, but none of those that I read mentioned resolve-url-loader’s requirements and the sass-loader’s shortcoming. With so many people using EOT files for webfonts (to support IE8) I cant believe I am unable to find a single application that supports viewing them. Hopefully this was helpful and you understood the problem that caused the error. In my case, the webpack rule for SASS looks like this: rules: As the documentation states, the loader must be included before sass-loader and all loaders preceding the URL resolver must generate a source map. fontawesome-webfont. ![]() It was made specifically to tackle the problem with sass-loader. fontawesome-webfont.woff: Library: font-awesome: Latest file version: 4.7.0: Download latest file version: Download fontawesome-webfont.woff latest version (4.7.0) Download or get link. The only proper solution is to complement your SASS bundling pipeline by including another loader before sass-loader to translate relative paths in url() CSS addresses. However, this will not solve the problem universally for all package vendors. One of the solutions is to change the $fa-font-path variable provided in the project. Therefore, webpack searches for the resource from the base directory and does not find it. Find out the best CDN to use with font-awesome 4.6.3 or use multiple CDN as fallback. Font Awesome SCSS loads the font resource like: url(./fonts/fontawesome-webfont.eot). The problem is that sass-loader cannot resolve relative paths for webpack modules by itself. h5p/font-awesome GitHub h5p / font-awesome Public Notifications Fork 30 Star 10 Code Issues 1 Pull requests Actions Projects Wiki Security Insights master font-awesome/fontawesome-webfont.eot Go to file Cannot retrieve contributors at this time 69. The error is repeated for other font files included in the Font Awesome library. Module not found: Error: Can't resolve './fonts/fontawesome-webfont.eot' If you are building webpack projects that are not scaffolded and you wish to include Font Awesome, you may come across an error when compiling their SASS version. Fix Font Awesome asset loading in webpack ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |