add plugins
pucheta-adrian opened this issue · 1 comments
pucheta-adrian commented
Hi,
how to add plugins in nuxt.config.js?
I am trying to add vuetify this.
like this
module.exports = {
/*
** Electron Settings
*/
electron: {
width: 1024,
height: 768
},
build: {
vendor: ['vuetify'],
plugins: ['~plugins/vuetify.js'],
head: {
link: [
{ rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Roboto' },
{ rel: 'stylesheet', href: 'https://fonts.googleapis.com/icon?family=Material+Icons' }
]
},
extend (config, { isClient }) {
// Extend only webpack config for client-bundle
if (isClient) {
config.target = 'electron-renderer'
}
}
}
}
detrohutt commented
@adrianrey05 Please see the Vue Plugins section of the Nuxt docs.
The plugins
section of your nuxt.config.js should be beside the build
section(that's for webpack settings), not inside of it. Also make sure you are importing and initializing vuetify in a file inside the plugins
folder which needs to be next to your pages
folder.