react-styleguidist
react-styleguidist copied to clipboard
Fonts not loaded on build
I had several fonts loaded from files. When I use the dev server, everything is fine, however if I make a build, the resulting static web is not loading fonts. Strange because Webpack is considering that files:

Also the .css is including that fonts, but the web is not loading the fonts:

Any help? thanks in advance
PD: Found that IT IS WORKING when the .css files imports the fonts like this: "http:localhost:5500/styleguidist/386536458dadfc278e60.woff2", i.e
Found the solution by setting this webpack config at styleguide.config.js:
dangerouslyUpdateWebpackConfig(webpackConfig, env) {
webpackConfig.output.publicPath = '/styleguide/'
webpackConfig.output.assetModuleFilename = 'static/media/[hash][ext][query]'
webpackConfig.cache = false
return webpackConfig
},
you can try fontawosome you just need to put rebuild url in index.html file