-
Notifications
You must be signed in to change notification settings - Fork 10
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
Static and Serverless Hosting Runtime Adapters #1008
Comments
This comment was marked as outdated.
This comment was marked as outdated.
So have been doing a little exploration into this with Netlify Serverless functions Current takeaways are:
|
Got an example of Greenwood running on Fly.io |
Just a heads up that Netlify CLI, specifically esbuild doesn't seem to support Had to do something like this to get it working await fs.writeFile(outputUrl, `
import 'wc-compiler/src/dom-shim.js';
import Page from './_${filename}';
export async function handler(request) {
console.log('${JSON.stringify(page)}');
let initBody = ${body};
let initHtml = \`${html}\`;
if (!initBody) {
const page = new Page();
await page.connectedCallback();
initHtml = initHtml.replace(\/\<content-outlet>(.*)<\\/content-outlet>\/s, page.innerHTML);
}
return new Response(initHtml);
}
`); |
OK, cutting this off at just Serverless (and static) hosting for now, with plugins ready to land for Vercel and Netlify. Created tracking items for the following |
Overview
Would like to provide Greenwood with the ability to adapt to specific runtimes / platforms for support Serverless and Edge runtimes like:
In particular, supporting #1007 , which will vary per hosting provider. The goal would be to support the following as Serverless and / or Edge functions:
Details
Main thoughts include
better way to "DI" compilation into generated SSR pages instead of through- completed in evaluate (remove) use of Workers for SSR and prerendering #1088handler
in bundle lifecycle? (As identified in Enhancement/issue 946 decouple build and serve commands from workspace #1079)Should API and SSR pages have chunks, or be entirely self contained and also minified in rollup.config.js? (As identified in Enhancement/issue 946 decouple build and serve commands from workspace #1079 )- deferred to single file bundles (SFBs) for SSR page and API routes #1118default export
) wcc#117greenwood serve
?In concert with #953
The text was updated successfully, but these errors were encountered: