-
Notifications
You must be signed in to change notification settings - Fork 13
Static site cannot be generated #368
Comments
This issue is being very critical for our project. We've been trying to fix it by ourselves (and make a PR) since last week but still no result. |
I've took a deeper look into this issue and imo it's not gonna be a quick fix. Code is a little bit outdated. Also I think we can do it much simpler and more extendable. Right now there are predefined queries which may look different for each project. So there is no way to add your custom routes. My proposition for
With this approach we will not need to manage separate rendering script (it will be same as server.ts) also we will be sure that it runs same as normal mode. Devs will also have more flexibility with defining what urls they want to render. We can also add info in docs how can may look example |
Got exactly same error with I had custom module which included After putting it back I debugged it to the line where was used After replacing this usage I got rid of this issue. In my case> - import getApiEndpointUrl from '@vue-storefront/core/helpers/getApiEndpointUrl';
...
...
- const apiUrl = getApiEndpointUrl(configMakecommerce.endpoint.callbacks, callType);
+ const apiUrl = configMakecommerce.endpoint.callbacks[callType]; |
@medteck did you manage to find a solution for this? Thanks! |
@gibkigonzo should this be elevated to P1? It means that no one can use static generation for VSF which seems like quite a big issue to me? |
We didn't find any solution and ended up abandoning VSF because of this specific bug. As I said it was very critical for us. |
I have the same Problem ... Any solutions yet ? |
VSF1 is not supporting static site generation anymore and is not going to. There is possibility to support it in the future of VSF2 |
Hi @Fifciu! 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. How much effort would it require to support SSG? Is it days, weeks, months? Maybe I can contribute. |
As VSF1 will only support security fixes, any new functionality will not be supported in VSF1, but if you want to use VSF2 then you can create an issue on VSF2, for the same. |
Oops... Will do, I only see now that this is the VSF1 repo! |
Current behavior
I am using vuestorefront version 1.12.0 with capybara theme. I am able to run the site via the dev script. However I wanted to generate vuestorefront as a static site so I can host it via a CDN. When I execute the following commands:
yarn build
yarn generate all
I get the following typescript errors:
Expected behavior
A folder with the name 'static' is generated and this folder contains the rendered index.html and product pages.
Steps to reproduce the issue
Repository
https://github.com/DivanteLtd/vue-storefront/blob/master/core/scripts/generate.ts
Environment details
VS code: 1.46.0
OS: macOS catalina 10.15.5
Node: 14.2.9
Yarn: 1.22.4
Typescript: 3.9.4
Vuestorefront: 1.12.0
Capybara theme: 1.0.1
The text was updated successfully, but these errors were encountered: