G
G
godsplane2021-10-19 22:31:25
JavaScript
godsplane, 2021-10-19 22:31:25

Connecting all fonts from a folder via sass and webpack?

Is there any universal way to take all the fonts and all their styles from a folder and connect them to the page via js or sass using webpack? Maybe there is some kind of plugin?
I found a suitable one for me https://github.com/cahnory/webpack-fontface , but it does not work and there is some kind of strange construction like

const { fontFamily, fontStyle, fontWeight } from './Roboto-LightItalic.ttf';

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2021-10-20
@Seasle

https://chriscourses.com/blog/loading-fonts-webpack

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question