erztemplerobba
Explore posts from serversuseAppConfig() not exposed to <script setup> in app.vue
I created a plugin
/app/plugins/fetchAppSettings.server.ts
that fetches my app's settings from the database.
This seems to work fine , console.log(useAppConfig().appSettings)
logs the settings correctly.
Now, I want to use these settings in my app.vue
script setup:
This console.log(appSettings)
logs the settings correctly server-side but client-side, I just receive an emtpy object.
In my nuxt.config.ts
, I registered the app settings:
and I created a app.config.ts
file and registered the appSettings there:
What am I missing here? Why aren't the appSettings passed to the client correctly? Help would be much appreciated.1 replies
nuxt/content markdownParser change local options
I use
import markdownParser from '@nuxt/content/transformers/markdown'
to parse the markdown
like this:
It works well but automatically replaces markdown headings like ### Heading
with links+anchortags like this:
I want to keep 'normal' header tags without links etc. so I'm looking for an option to change this behavior in my component. If possible, I don't want to disable this functionality globally in my nuxt config because I might need it later in a blog component.3 replies
Nuxt warning when adding v-if="appReady" to app.vue
My nuxt app is heavily reliant on data that comes from my db and some external sources, so I want to add a spinner/progress component until the necessary data is fetched. Right, now, I'm using this:
appReady
is simply a ref that gets set to true
in my onMounted
hook whenever the required data is present.
I ran into the problem that nuxt always throws a <NuxtPage> or <NuxtLayout> warning depending on which element I add the v-if="appReady"
check to:
I was wondering what is the "correct" way of doing that?2 replies
Nuxt3 feasible with large amount of pages?
I want to build a bigger application with more than 500 pages/articles. Many pages have lots of markup (bold, underlined, ...) as well as relatively complex tables with colored table cells which I want to style with vuetify components + custom css.
So far I've only built smaller apps with up to 20-30 pages and fed content via an external API. My question is if a relatively large amount of pages will be make the whole application very slow.
3 replies