djmtype
djmtype
Explore posts from servers
NNuxt
Created by djmtype on 7/28/2024 in #❓・help
Prerender RouteRules clarification
My nuxt config:
// nuxt config
nitro: {
routeRules: {
'/api/spotify/**': { static: true },
}
}
// nuxt config
nitro: {
routeRules: {
'/api/spotify/**': { static: true },
}
}
Does that conflict with my /server/api/spotify/[page].js if I use defineCachedEventHandler()? If so, what takes precedence?
// server/api/[page].js
export default defineCachedEventHandler(async (event) => {
// $fetch stuff
}, { maxAge: 60 * 60 })
// server/api/[page].js
export default defineCachedEventHandler(async (event) => {
// $fetch stuff
}, { maxAge: 60 * 60 })
2 replies
NNuxt
Created by djmtype on 2/24/2023 in #❓・help
Nuxt Image and Netlify issues in SSG
Looking at the video when Daniel Roe was on Learn with Jason, they also integrated @nuxt/image-edge into a Nuxt 3 project. https://youtu.be/6OPIirkd1vE?t=4251 Needless to say on Netlify, nuxt-img is not working. https://nuxt-3-nitro.netlify.app/ Visit any post, and you'll see every image is broken. Yet if you generate or build and preview this project locally, all images load just fine.
17 replies