Closed mcarreon closed 4 years ago
Switched next.config.js to this, still does not work:
const withSass = require('@zeit/next-sass');
const withFonts = require('next-fonts');
const withPlugins = require('next-compose-plugins');
const nextConfig = {
test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff2)$/,
use: {
loader: 'url-loader',
options: {
limit: 100000
},
publicPath: "./",
outputPath: "static/",
name: "[name].[ext]"
}
};
module.exports = withPlugins([withFonts, withSass, {
exportPathMap: function() {
return {
'/': { page: '/' },
'/resume': { page: '/resume' },
'/blog': { page: '/blog' },
};
}
}], nextConfig);
Hi @mcarreon : Please refer to https://github.com/rohanray/font-error and see if it helps. Also, please try to share a repro minimal project. Thanks -RR
Closing the ticket for now. @mcarreon Please reopen if shared link did not help. Thanks -RR
I'm trying to load in some Google Fonts in ttf format and they don't seem to want to load. I'm using next-fonts as well as SCSS for styling. The fonts are under in /static/fonts/ but I can't figure out what I'm doing wrong. Any help would be appreciated!
I'm loading the plugins like this:
And my SCSS imports are as such: