Comments (7)
Yes, Qwik is designed with SSR/SSG and CDNs in mind.
from qwik.
@mhevery I don't see where this is made clear in the Qwik docs how to do this. Whenever I make a starter it ends up making a server entry point when I run npm build
. I would prefer to have a command or some way to output static HTML directly. Maybe thats possible with some tinkering but I'm not sure how to do that.
To me it would make sense for the Qwik CLI to be updated to have a SSG starter option.
Also should this issue be open?
from qwik.
Maybe change the meaning of this issue, or make a new one, which is a feature request for such a command line option rather than a question about whether Qwik can do this.
Static generation doesn't pick up all of Qwik’s capabilities, but I think there are use cases where it is very useful. For example: a site which is static for 99% public visitors, served for them from a static CDN, and accommodates 1% logged-in users with client-side hydration.
from qwik.
Maybe change the meaning of this issue, or make a new one, which is a feature request for such a command line option rather than a question about whether Qwik can do this.
I still don't understand how you would do this in Qwik in the first place though
from qwik.
Yes, this issue was a question please make a new issue.
As of right now when you deploy to Cloudflare/Netlify Qwik will generate pages and cache them. In essence, this will give you a SSG.
If you are looking for a command to just build the system ahead of time (classical SSG) We have not implemented it yet. But would love some contribution. We were thinking of just starting a server and then having a tool that just follows all of the links in localhost and downloads them to local directory. Such as scraper should be easy to write. Would you be up for it?
from qwik.
Having this dynamic ssg makes it easier to build autocomplete search if every new input leads to redirect that would hit the cache right?
In a proper SSG you'd basically force the crawler to fire a lot of queries into auto complete to build pages for them.
With gatsbyjs you could then prefetch potential next inputs and it would grab the serialized data, would something like this work here?
from qwik.
Has there been any progress on this?
I was hoping that resume-ability means in this case that all pages are statically generated and hosted on cloudflare pages as static html files and served directly to the browser. From there they are resumed going through SSR in the cloudflare workers when the user starts interacting with the site in his browser.
That would give us the best performance and lowest use of CPU cycles, right?
Is this the correct way of thinking about it @mhevery ?
from qwik.
Related Issues (20)
- [🐞] Weird behavior when accessing props value in differents way HOT 3
- Probably meant the mdx HOT 1
- [✨] Add the `unwrapProxy` as a Low-Level API HOT 3
- [📖] Hooks Cookbook HOT 2
- [🐞] Custom hook failing when hook function is named starting with use.* HOT 9
- [✨] HTTP 103 Early Hint
- [🐞] service-worker.js pre-populates the cache for some bundles that are not present on the current page HOT 3
- [✨] Pre-render at build time paths specified by `onStaticGenerate` in Vercel adapter
- [✨]Automatically compress images to support more devices.
- Project Template for "Basic App" does not recognize RouteLoader [🐞] HOT 1
- [✨] Allow data to be passed in `StaticGenerateHandler`
- [🐞] Warning and errors when validating the generated HTML using Nu Html Checker HOT 2
- [📖] Portal recipe gives a lexical-scope-error HOT 1
- [🐞] lib mode do not respect custom lib.entry in vite config HOT 2
- [🐞] Weird location.hash / window.history behaviour HOT 5
- [📖] /brand page to share Qwik Logo HOT 1
- [✨] How to contact for security issues & Adding security policy HOT 1
- [🐞]Form gets checkbox data HOT 9
- [🐞] Version 1.5.3 build is broken: Cannot load native addon because loading addons is disabled HOT 4
- [🐞] Duplicate export on "npm run build.client"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qwik.