-
Notifications
You must be signed in to change notification settings - Fork 14
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
[Doubt] Can i deploy react app with static build and serverless react components? #81
Comments
I really think what we are looking for is possible through this repo :) |
MFNG does not offer a static export of pages as it does not have a concept of file-based routes. The static client assets as well as the server-side rendered responses can be cached in a CDN though, which the AWS example app has configured in https://github.com/unstubbable/mfng/blob/main/apps/aws-app/cdk/stack.ts. |
We are looking for an SPA static export with RSC, the RSC not only be bundled at build time, but the RSC components should be hydrated through serverless functions. |
if you couldnt figure out what I am trying to look for, please let me know :) |
Statically built RSC components don't need serverless functions to be hydrated. You only need a CDN and a browser to accomplish that. But again, MFNG does not offer a static build of RSC components. Instead, it needs a request handler (e.g. a serverless function) to render them at request time (in case of a CDN cache MISS). If you're looking to create fully or partially static RSC output at build time, I recommend using Next.js. |
we dont want static build of RSC components either, I will play with the repo for now and let you know if this can fulfill our requirements. Next.js is out of our scope because we only want static export of a single react component and deploy it in CDN which later can be used in html pages. |
We are exactly looking for this approach
I am skimming through the
aws-app
code and I couldnt find where you are building the react app as a static export, you are only deploying the entire application to a lambda, which we are not looking for. We are looking for deploying the react app as a bundle in CDN, power the react server components through lambda functions.The text was updated successfully, but these errors were encountered: