https://github.com/nuxt/nuxt.js/issues/
I am using Nuxt.js with Vuetify.js where I want to change the default theme colors.
I created a file: ~/plugins/vuetify.js to change the default primary color to red.
Here is its content:
import Vue from 'vue'
import Vuetify from 'vuetify'
Vue.use(Vuetify, {
theme: {
primary: '#ff0000'
}
})
In nuxt.config.js I asked Nuxt.js to use this plugin:
export default {
plugins: ['~/plugins/vuetify']
}
Calling primary must render the red color
The default primary color #1976d2 is displayed
This is true maybe in whatever Nuxt.js version you use.
Please try with the vuetify module instead of your custom plugin: https://github.com/nuxt-community/vuetify-module/
I resolved the problem, it was not a bug.
I posted the solution on StackOverflow
Hope this can be useful for someone else in the future.
Thank you
@begueradj I also have the same problem what was your solution?
Same here, the solution link is broken.
@Alecell Indeed, sorry ... I noticed in newer Nuxt versions, you can control that in nuxt.config.js file which is in the root directory of your project
@masterDoomX Sorry for the late reply, please just open nuxt.config.js, scroll down until you see what you are looking for.
@begueradj
Try this. I was in the same problem and solved it this one :)
vuetify: {
theme: {
themes:{
light:{
primary: '#ff9f1a'
}
}
}
},
I refer to the link,
https://vuetifyjs.com/ko/customization/theme
I using @nuxt/vuetify
then on my nuxt.config.js
buildModules: [
'@nuxtjs/vuetify',
],
vuetify: {
customVariables: ['~/assets/variables.scss'],
theme: {
dark: false,
themes: {
light: {
primary: '#5398d9',
}
}
}
}
Thank you for sharing @cjg9040
I set theme: disable: true,
still, default theme--lightapplied
I set
theme: disable: true,
still, defaulttheme--lightapplied
same, you have find a soluce ?
The docs should have mentioned that you need to envelope the app on
Took me a couple hours to figure out