X
X
xenofobius2018-02-22 20:04:52
Angular
xenofobius, 2018-02-22 20:04:52

How to specify the path to static files (fonts) in the font-awesome module?

Installed according to the instructions , with ng-serve everything works, the fonts are displayed. After build, the fonts are not loaded, let them point to mysite/font.ttf, but they lie in mysite/assets/font.ttf, how can I specify the path from where to load the fonts? after compilation, the style.bundle.js file looks like this:

/***/ "../../../../font-awesome/fonts/fontawesome-webfont.ttf?v=4.7.0":
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "fontawesome-webfont.b06871f281fee6b241d6.ttf";
/***/ }),

but I would like something like this:
/***/ "../../../../font-awesome/fonts/fontawesome-webfont.ttf?v=4.7.0":
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "/static/assets/fonts/fontawesome-webfont.b06871f281fee6b241d6.ttf";
/***/ }),

Googled, tried adding path to assets angular-cli.json
{ "glob": "**/*", "input": "../node_modules/font-awesome/fonts/*", "output": "./assets/fonts/" }

How can I force fonts to be loaded from where? (I don't use css preprocessor)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question