vuestorefront / vue-storefront

Alokai is a Frontend as a Service solution that simplifies composable commerce. It connects all the technologies needed to build and deploy fast & scalable ecommerce frontends. It guides merchants to deliver exceptional customer experiences quickly and easily.
https://www.alokai.com
MIT License
10.65k stars 2.08k forks source link

[Feature]: Static Site Generation #6888

Open martijnvdbrug opened 1 year ago

martijnvdbrug commented 1 year ago

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?

Additional information

No response

What version of Vue Storefront this feature can be implemented?

That's up to you :)

Code of Conduct

filrak commented 1 year ago

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

martijnvdbrug commented 1 year ago

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