8ear
Can't the server directory be used in SSG?
Hi, I am a company slave who was pushed into a corner just before the release of the product.
We are using CMS and developing with nuxt3.
I am developing with SSG, but the client does not want to display the path to the external API, so I have implemented a search implementation that usesFetch to get a list of the original data and then creates server/api/search.js in nuxt and calls this as the internal API to filter the data. The search is then performed by calling this internal API for filtering.
Now, here is the problem... when I generate npx, an error occurs and server/api/search.js is no longer available.
POST http://localhost:3000/api/search 404 (Not Found)
Can't I use server/hogehoge in the SSG environment?
If not, I would appreciate it if you could give me an alternative.
(https://nuxt.com/docs/guide/directory-structure/server)2 replies
Not SSG
Hello, I am creating a CMS project using nuxt3.
The problem I am having now is that it is not SSG even though I have set it up as follows.
When I update data from CMS on the screen that I have generated and previewed using npx, the data on the screen is updated.
Please help me.
nuxt.config.js export default defineNuxtConfig({ ssr: true, target: "static",
35 replies