Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: How to access appConfig in configfile #285

Closed
derHodrig opened this issue Oct 18, 2024 · 2 comments
Closed

Question: How to access appConfig in configfile #285

derHodrig opened this issue Oct 18, 2024 · 2 comments

Comments

@derHodrig
Copy link

I have setup the app like this: https://vuetify-nuxt-module.netlify.app/guide/vuetify-configuration-file.html

My app.config got an object theme with theme.actTheme = ThemeAbc.name

I wonder, if its possible to access the app.config inside the vuetify config file, so I can setup the vuetify themes there:

theme: {
    defaultTheme: appConfig.theme.actTheme,
    themes: {
      ThemeAbc,
      ...
    },
  },

for this I have to call the useAppConfig() composable. Is this possible, if yes how? I could not get it to work.

@userquin
Copy link
Member

I guess you can use useAppConfig in a new plugin hook: https://vuetify-nuxt-module.netlify.app/guide/nuxt-runtime-hooks.html (use vuetify:before-create hook, the options passed will be used to call createVuetify, juts add your themes inside the hook)

@derHodrig
Copy link
Author

derHodrig commented Oct 19, 2024

Thank you for your fast response.

I will close the issue, because i will not going further with nuxt in general.

@derHodrig derHodrig closed this as not planned Won't fix, can't repro, duplicate, stale Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants