vuestorefront/vue-storefront

[Feature]: Static Site Generation

martijnvdbrug opened this issue · 2 comments

How the project can be improved?

I found this issue in the VSF1 repo about static SSG. It mentions that VSF2 might implement SSG.

So, I was wondering, Is there any update on this? I see VSF2 is out now, but I don't think SSG is supported yet.

With my company Pinelab I am building most of my storefronts as static sites using Vendure. I see there already is an integration available for Vendure.

We are currently maintaining our own Vue e-commerce components, but I'd rather contribute to Vue Storefront.
But, I really prefer SSG for most of our storefronts.

How much effort would it require to support SSG? Is it days, weeks, months? Maybe I can contribute.

What are the acceptance criteria?

  • Allow storefronts to be statically generated

Additional information

No response

What version of Vue Storefront this feature can be implemented?

That's up to you :)

Code of Conduct

  • I agree to follow this project's Code of Conduct
filrak commented

Hey!

So, technically you can use VSF2 with SSG. VSF2 is based on Nuxt that support that feature our of the box.

Here's what you'd need to do

  1. Check out this document on Nuxt docs and adjust your pages for SSG
  2. Deploy VSF Middleware as a separate node app - it's using Nuxt SSR context so to make the frontend static you should run middleware separately

I don't know about anyone who used that way though so I'm not sure if you encounter any issues or not. If you do, we're happy to help

Awesome, I am going to give it a try! (I guess this issue can be closed for now?)