Skip to content

Fixed SSG pnpm generate errors #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

amerkay
Copy link

@amerkay amerkay commented Apr 28, 2025

Scope

Love the work you've done on the visual editing and the example Nuxt 3 code base, @formfcw.

I need Server-side Generation (static site) for my project, which was not functional. Over the last couple of days, I applied a bunch of fixes to resolve all issue. Now it's working great.

The main change is that everything in the ./server/ folder and all /api/* calls are now obsolete. I left them in the code base, tho. I also upgrade all packages to latest versions.

What's changed:

  • Added .nvmrc set to node v22. Added docker-compose.yml and updated README.md with instructions.
  • SSG fix: Use $directus.request( instead of /api/*. Updated [...permalink].vue, SearchModel.vue, Posts.vue, FormBuilder.vue, [slug].vue and AdminBar.vue.
  • Added missing twitter.svg (copy of x.svg).
  • Fixed faviconURL missing directusUrl part.
  • SSG prerender.routes lists populated using new getSitemapUrls.ts. Endpoint /api/sitemap is now obsolete.
  • Everything in /server/ is now unused, as SSG mode does not have a server.
  • Upgraded all packages to latest versions. Pending, move from radix-vue to reka-ui v2.
  • Use defineAsyncComponent to have vite split the code and only load components being used for the current route. Updated BaseBlock and BaseFormFIeld's imports.

Potential Risks / Drawbacks

  • Data structure in directus XHR calls is now visible in browser console network tab for SSR and SSG.

Review Notes / Questions

N/A

amerkay added 5 commits April 28, 2025 18:46
Added docker-compose.yml and updated README.md with instructions.
…rmalink].vue, SearchModel.vue, Posts.vue, FormBuilder.vue, [slug].vue and AdminBar.vue.

Added missing `twitter.svg` (copy of `x.svg`).
Fixed faviconURL missing `directusUrl` part.
Endpoint `/api/sitemap`  is now obsolete.
Everything in /server/ is now unused, as SSG mode does not have a server.
Pending, move from `radix-vue` to `reka-ui` v2.
…components being used for the current route. Updated BaseBlock and BaseFormFIeld's imports.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant