You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
npm run generate
> generate
> nuxt generate
Nuxt 3.8.1 with Nitro 2.7.2 10:29:42 AM
ℹ Strapi Admin URL: https://api.domain.de/admin 10:29:42 AM
ℹ Building client... 10:29:43 AM
ℹ vite v4.5.0 building for production...
the generated URL for strapi media was http://localhost:1337
but the generated static client does not have access to localhost obviously
I found that in useStrapiMedia.ts there is this line
I already changed the line to always use the public strapi config and it worked.
Would it be possible to get the public URL for media in the generate task even if process.server returns true?
Otherwise I must open the /api endpoint of strapi and close it afterwards everytime I generate the static client with the prerendered content.
Maybe one way to solve this could be to loop trough process.argv and lookup for 'generate' parameter.
Another way may be to add extra configuration in runtime config and implement a mechanism that checks the parameter, e.g. "generated: true"
Any other suggestions?
The text was updated successfully, but these errors were encountered:
Hello dear devs!
I found a confusing behaviour of the strapi nuxt module.
I'v got this in my nuxt.config.ts :
When I did:
the generated URL for strapi media was http://localhost:1337
but the generated static client does not have access to localhost obviously
I found that in useStrapiMedia.ts there is this line
I already changed the line to always use the public strapi config and it worked.
Would it be possible to get the public URL for media in the generate task even if process.server returns true?
Otherwise I must open the /api endpoint of strapi and close it afterwards everytime I generate the static client with the prerendered content.
Maybe one way to solve this could be to loop trough process.argv and lookup for 'generate' parameter.
Another way may be to add extra configuration in runtime config and implement a mechanism that checks the parameter, e.g. "generated: true"
Any other suggestions?
The text was updated successfully, but these errors were encountered: