141
rated 0 times
[
144]
[
3]
/ answers: 1 / hits: 17241
/ 9 Years ago, thu, october 22, 2015, 12:00:00
I have this code in a React element:
require('../../Style/fonts/SomethingStrange.ttf')
In my Webpack.config:
{ test: /.(ttf|otf|eot|svg|woff(2)?)(?[a-z0-9]+)?$/,
loader: 'file-loader?name=fonts/[name].[ext]' }
Problem: no font on my webpages...
Doesn't Webpack let me automatically require fonts? Do I have to program anything else to load fonts?
More From » reactjs