I\'ve been trying for an hour to find a way to import a Google Font into a VueJS Component, but I cannot seem to find a solution, nothing worked yet, not even the stuff from pre
I would like to add to the answer given by msqar. If you are going to use Google Fonts Webpack Plugin: (https://www.npmjs.com/package/google-fonts-webpack-plugin ) and you are using the Vue CLI, you can add a vue.config.js file inside the root of your project. See Vue CLI docs: (https://cli.vuejs.org/guide/webpack.html#simple-configuration)
Then add the code to that file:
const GoogleFontsPlugin = require("google-fonts-webpack-plugin");
module.exports = {
chainWebpack: config => {
plugins: [
new GoogleFontsPlugin({
fonts: [
{ family: "Source Sans Pro" }
]
})
]
}
}