The problem I am facing is when I run the project using npm run dev, the fonts are loaded exactly how I want
but when I make a build and run the command npm run start, the fonts are different
This is how my nuxt.config file looks like
var dynamicPages = require('./dynamicPages.json')
export default {
// Target: https://go.nuxtjs.dev/config-target
target: 'server',
buildDir: '_nuxt/dist/',
// build: {
// publicPath: '_nuxt/dist/'
// },
generate: { routes: dynamicPages },
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: 'level-1',
htmlAttrs: {
lang: 'en'
},
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: '' },
{ name: 'format-detection', content: 'telephone=no' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
],
},
// Global CSS: https://go.nuxtjs.dev/config-css
css: [
'~/assets/styles/style.scss',
'~/assets/fonts.css'
],
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [
{ src: '~/plugins/analytics.js', mode: 'client' }
],
// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [
'@nuxtjs/google-analytics'
],
apollo: {
clientConfigs: {
default: {
httpEndpoint: "https://rickandmortyapi.com/graphql"
}
}
},
// Modules: https://go.nuxtjs.dev/config-modules
modules: [
// https://go.nuxtjs.dev/bootstrap
'bootstrap-vue/nuxt',
'nuxt-helmet',
'@nuxtjs/apollo',
'nuxt-helmet',
'nuxt-webfontloader',
'@nuxtjs/gtm',
'nuxt-fontawesome',
],
router: {
// trailingSlash: false,
middleware: 'trailingSlashRedirect',
},
fontawesome: {
imports: [
{
set: '@fortawesome/free-solid-svg-icons',
icons: ['fas']
},
{
set:'@fortawesome/free-brands-svg-icons',
icons: ['fab']
}
],
},
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
// extend (config, ctx) {
// // Run ESLint on save
// if (ctx.isDev && ctx.isClient) {
// config.module.rules.push({
// enforce: 'pre',
// test: /\.(js|vue)$/,
// loader: 'eslint-loader',
// exclude: /(node_modules)/
// })
// }
// }
},
}
is there an issue with how my nuxt file looks like? any suggestions?