Comments (4)
You need to use nuxt.config.js to modify Vuetify, and delete your vuetify.js plugin.
So your nuxt.config.js will have a vuetify object like so:
vuetify: {
customVariables: [
'~/assets/style/variables.scss'
],
theme: {
themes: {
light: {
primary: '#334451',
secondary: '#77b139',
accent: '#77b139',
error: colors.red.base,
warning: colors.orange.base,
info: '#ffffff',
success: '#77b139',
black: '#010101',
white: '#ffffff'
},
dark: {
primary: '#334451',
secondary: '#77b139',
accent: '#77b139',
error: colors.red.base,
warning: colors.orange.base,
info: '#ffffff',
success: '#77b139',
black: '#010101',
white: '#ffffff'
}
}
},
treeShake: true
},
Then you can modify your variables.scss file.
from vuetify-module.
I am not a contributor to this repository, but if we look under the lib directory in the code, the plugin.js file contains:
import Vue from 'vue'
<% if (options.treeShake) { %>
import Vuetify from 'vuetify/lib'
<% } else { %>
import Vuetify from 'vuetify'
<% } %>
Vue.use(Vuetify)
export default ({ app }) => {
app.vuetify = new Vuetify(<%= JSON.stringify(options.vuetifyOptions, null, 2) %>)
}
It looks like it is taking care of the plugin file for you and referencing options in nuxt.config.js.
Also, check out the module.js file. This @nuxt/vuetify-module is basically taking care of a lot of the setup and configuration for you to optimize Vuetify with Nuxt.
For instance, it looks like it is requiring a SASS loader and pulling in the main.sass file when tree shake is enabled. No need for additional plugin files, just configure your options in nuxt.config.js and then modify variables in variables.scss and you are on your way.
For example, change the font in variables.scss:
@import '~vuetify/src/styles/styles.sass';
$body-font-family: 'Roboto Condensed', sans-serif;
I have a couple projects using the vuetify object in nuxt.config.js and modified the variables.scss file and all seems to be working quite well.
Hope this helps.
from vuetify-module.
What is the difference? I am currently just referencing the plugin file like this in my nuxt.config.js:
modules: ['@/plugins/vuetify'],
from vuetify-module.
Please use discord for asking question https://discordapp.com/invite/nHzfFwe
Closing this as non issue, like @mgreengithelps said u shouldnt use plugin at all and should use moduel with configuration in nuxt.config
from vuetify-module.
Related Issues (20)
- Object literal may only specify known properties, and 'vuetify' does not exist in type 'NuxtConfig'. HOT 2
- How can I use nuxt vuetify-module in specific layout and its pages?
- null model for v-tabs-items causes different output in SSR and client
- [BUG] Long load time in Chrome, hang in Firefox due to long icon loading HOT 8
- [BUG] The contents of v-card children are duplicated when an anchor tag is added HOT 3
- Installing problem on cpanel/nodevenv
- v-virtual-scroll component is missing HOT 1
- How to locally install material icons?
- Vue 2.7 compatibility HOT 3
- nuxt-bridge not being rendered on server side
- Cannot read properties of undefined (reading 'resolveAlias') with Nuxt3 HOT 2
- A v-form nested inside another v-form is a production silent bomb.
- Vuetify 3 release HOT 7
- vuetify not initialized HOT 1
- nuxtjs/vuetify (1.12.3) - Not working due to sass loader issue HOT 1
- Breadcrumbs component: clicking on the breadcrumb causes the site to rerender
- Module cases "JavaScript heap out of memory"
- Syntactically wrong css generation due to very old sass version
- Nuxt 3 Support HOT 8
- Need way to move vuetify-theme-stylesheet from top of head section to any position
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vuetify-module.