Reputation: 321
Hi I cannot add fontawesome to my nuxt app I have try adding it in the nuxt.config.js and it still does not seem to work.
head: {
title: pkg.name,
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: pkg.description }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/leap-icon.ico' },
{ rel: 'stylesheet', ref: 'https://use.fontawesome.com/releases/v5.2.0/css/all.css' }
]
},
Upvotes: 6
Views: 12023
Reputation: 1498
Below is the correct method to implement external resource in nuxt.
link: [{ rel:"stylesheet", type:"text/css", href:'http://www.example.com/assets/lib/bootstrap/css/bootstrap.min.css' }]
Upvotes: 15
Reputation: 571
I think just changing type
to href
should fix it. e.g.
{ rel: 'stylesheet', href: 'https://use.fontawesome.com/releases/v5.2.0/css/all.css' }
Upvotes: 2