davestewart
Explore posts from serversHow come there are so few events in Nuxt UI?
OK, so there are emits:
https://github.com/nuxt/ui/blob/dev/src/runtime/components/overlays/Slideover.vue#L74C3-L74C75
How come they are not documented?
3 replies
Nuxt Layer: Composable from layer not found
AFAIK autoimports are for core folders only; you'll have to set up layer imports manually.
I have used the layer config option
components
for auto-importing layer components, but I think maybe the imports
statement is what you want here.
https://nuxt.com/docs/api/nuxt-config#imports
I don't know if it's supposed to be absolute paths or folders... the docs never seem to be clear about this.
In components, you can use aliases, so might be something like:
8 replies
Nuxt Image in Nuxt Content Assets
For anyone else wondering if it can be done, apparently for now, it cannot:
https://twitter.com/danielcroe/status/1779196430055334008
5 replies
Nuxt Image in Nuxt Content Assets
Hmm. I can't seem to quite crack this in code.
Is there a way to add layers programmatically?
Right now I'm attempting to add the extends layer in the module setup, something like this:
At the same time I add the
nuxt.config.ts
file and the public
folder.
Clearly a bit hacky, and in Nuxt Image ipxSetup()
, the layer is not appearing:
If I add a manual extends
in nuxt.config.ts
the layer shows in the ipx setup function, and Nuxt Image shows succesfully in the app.
I could instruct users to do this manually, but I would love for it just to be transparent.5 replies
Nuxt Image in Nuxt Content Assets
Digging a bit deeper, the notes in the Nuxt Image docs might give a clue to why this is so:
For ipxStatic provider, if images weren't crawled during generation (unreachable modals, pages or dynamic runtime size), changingAs such I ran an additional IPX server pointing at the directory I mention above and it does indeed serve the image: Again, not sure if this is the right approach, but I'm assuming IPX is set up to only serve from one directory at a time, or the instance (dir
frompublic
causes 404 errors.
createIPX
) can only serve one folder at a time... so suspect I need to make a new IPX instance and run that separately:
- https://github.com/nuxt/image/blob/main/src/runtime/ipx.ts
If any Nuxt Image maintainers are around to point me in the right direction, I would appreciate it.
cc @danielroe , @pi0
Thanks.5 replies
generate vs prerender
FWIW I managed to break my Nuxt Content production site by settinging route rules to
{ isr: true }
.
Pages load on first navigate, but subsequent navigations to Content pages render your entire content database as the markdown / element node strtucture they're stored in. I don't know enough about ISR to know if this is a bug or expected behaviour, but suspect bug.
Don't do this at home, kids!11 replies
generate vs prerender
This article is getting there (it also calls out the docs for lacking info):
https://blog.risingstack.com/nuxt-3-rendering-modes/
11 replies
generate vs prerender
Thanks for the link, but the topics it covers are more for client side performance, hydration, etc.
My Lighthouse performance is already 94; I just want more info on the mechanics of SSR, routeRules, etc. and how it all works together which I think is a bit light in the docs.
Looks like there's also
{ static: true }
in Nitro; what is this? How it is it different from prerender? Or should I use { isr: true }
?
And for example @manniL / TheAlexLichter demos nitro.prerender.routes
; I wonder why this vs Nuxt's own routeRules
(which I presume are passed to Nitro anyway).
TL;DR I just want more info how all these libs are configured and layered together11 replies
🐛 Nuxt muddling elements in rendered output #bug
So that did not solve the problem.
I've tried all kinds of things in the meantime, like removing components, markup, etc, etc. constantly rebuilding and re-previewing; it still happens.
I guess if this probably is a hydration error, I should just have the server render this route and move on.
Is it worth reporting this bug to the Nuxt repo?
I couldn't provide a repo, other than allowing maintainers to checkout this commit (it's a private repo).
20 replies
🐛 Nuxt muddling elements in rendered output #bug
Hey Alex, yeeah, I think that's probably the best bet, though I've been holding off because of this bug:
https://github.com/nuxt/cli/issues/169
https://github.com/davestewart/nuxt-content-assets/issues/49#issuecomment-1719327223
Not sure if you have insight on that? Honestly, I find this situation quite depressing.
20 replies