Giter VIP home page Giter VIP logo

Comments (11)

ricardogobbosouza avatar ricardogobbosouza commented on May 25, 2024 4

@csheppard you need to use a plugin for this

// plugins/vuetify-theme-cache.js
import LRU from 'lru-cache'

const themeCache = new LRU({
  max: 10,
  maxAge: 1000 * 60 * 60 // 1 hour
})

export default (ctx) => {
  ctx.app.vuetify.framework.theme.options.themeCache = themeCache
}
// nuxt.config.js
modules: [
  '@nuxtjs/vuetify'
],

plugins: [
  '~/plugins/vuetify-theme-cache.js'
]

from vuetify-module.

kevinmarrec avatar kevinmarrec commented on May 25, 2024 1

@csheppard

With next module release version (1.0.0) you'll be able to use @ricardogobbosouza snippet and replace ctx.app.vuetify.framework by ctx.$vuetify as shorten path.

export default (ctx) => {
  ctx.$vuetify.theme.options.themeCache = themeCache
}

from vuetify-module.

kevinmarrec avatar kevinmarrec commented on May 25, 2024 1

@csheppard Indeed it needs full rebuild when updating module options, we may implement a feature like providing a path (string) to the Vuetify options so it registers & watch it like a plugin to prevent these full rebuilds.

from vuetify-module.

kevinmarrec avatar kevinmarrec commented on May 25, 2024

@csheppard Looks like a Vuetify issue, is it still reproducible with our last beta version of the module ?

from vuetify-module.

kevinmarrec avatar kevinmarrec commented on May 25, 2024

Good catch @ricardogobbosouza , this is needed cause of some serialization of Nuxt configuration options I guess ?

from vuetify-module.

ricardogobbosouza avatar ricardogobbosouza commented on May 25, 2024

@kevinmarrec yes, because of the serialization

from vuetify-module.

csheppard avatar csheppard commented on May 25, 2024

Great work, the plugin method is definitely needed as I had to stop using this module and go manual again as editing nuxt.config.js (adding icons/colour edits) requires full rebuild everytime.

from vuetify-module.

ricardogobbosouza avatar ricardogobbosouza commented on May 25, 2024

@kevinmarrec can closed?

from vuetify-module.

ricardogobbosouza avatar ricardogobbosouza commented on May 25, 2024

@kevinmarrec maybe we should reopen this with this option you mentioned above 🤔

from vuetify-module.

kevinmarrec avatar kevinmarrec commented on May 25, 2024

@ricardogobbosouza I would say new issue tagged as feature request

from vuetify-module.

kevinmarrec avatar kevinmarrec commented on May 25, 2024

@ricardogobbosouza Created #77

from vuetify-module.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.