vuetify-nuxt-module icon indicating copy to clipboard operation
vuetify-nuxt-module copied to clipboard

moduleOptions Module Hook doesn't work

Open Fukao0129 opened this issue 11 months ago • 0 comments

I use my own module file as below:

modules/my-vuetify-module.ts

import { defineNuxtModule } from '@nuxt/kit'
export default defineNuxtModule({
    setup(_options, nuxt) {
      nuxt.hook('vuetify:registerModule', register => register({
        moduleOptions: {
           styles: "none" // ← Doesn't work!
          },
          vuetifyOptions: {
            theme: {
              themes: {
                light: {
                  colors: {
                    primary: "#000", // ← Work
                  },
                },
              },
            },
          },
      }))
    },
  })

nuxt.config.ts

import MyVuetifyModule from './modules/my-vuetify-module'
export default defineNuxtConfig({
  devtools: { enabled: false },
  modules: [MyVuetifyModule, 'vuetify-nuxt-module'],
  routeRules: {
    "**": { ssr: false },
  },
});

Even if I change something in moduleOptions, nothing will change. vuetifyOptions seems to be working because if I change something in it, the changes will be reflected properly.

Something wrong, or a bug?

Reference

vue 3.5.0 nuxt 3.13.0 vuetify-nuxt-module 0.18.3

Fukao0129 avatar Nov 22 '24 07:11 Fukao0129