Skip to content

webpack: loading fonts (specifically font-awesome) #1463

Description

@intellix

Using the webpack branch and am attempting to load in font-awesome. Loading other 3rd party libs so far has been amazing in comparison to how it was before.
I'm having an issue with getting webpack to pickup the font-awesome files. Getting 404 errors in console:

http://localhost:4200/node_modules/font-awesome/fonts/fontawesome-webfont.woff2?v=4.6.3 http://localhost:4200/node_modules/font-awesome/fonts/fontawesome-webfont.woff?v=4.6.3 http://localhost:4200/node_modules/font-awesome/fonts/fontawesome-webfont.ttf?v=4.6.3 404 (Not Found)

I'm using node-sass, and I've tried a large combination of things:

$fa-font-path: 'node_modules/font-awesome/fonts';
$fa-font-path: 'font-awesome/fonts';
$fa-font-path: '~/font-awesome/fonts';

I've tried font-awesome-loader and including that via JS. Other people recommend having a webpack-config.js, which doesn't seem to do anything either as I'm guessing angular-cli goes around that?

Activity

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

    P1Impacts a large percentage of users; if a workaround exists it is partial or overly painfultype: bug/fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions