We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently wcc does not yet offer 100% native edge function runtime support, though the DOM shim itself works just fine. This means that although Edge functions are a little more DIY than serverless, it is still possible.
import '../../node_modules/wc-compiler/src/dom-shim.js'; import Footer from './components/footer.js'; import Header from './components/header.js'; export default async function () { const footer = new Footer(); const header = new Header(); footer.connectedCallback(); header.connectedCallback(); const response = new Response(` <!DOCTYPE html> <html lang='en'> <head> <meta charset='UTF-8'> <meta name='viewport' content='width=device-width, initial-scale=1'> <title>WC @ The Edge</title> </head> <body class='padding-32'> <wc-header> ${header.getInnerHTML({ includeShadowRoots: true })} </wc-header> <wc-footer> ${footer.getInnerHTML({ includeShadowRoots: true })} </wc-footer> </body> </html> `); response.headers.set('content-type', 'text/html'); return response; }
With wcc supporting this out of the box, we can remove some of the extra boilerplate from the edge demo examples.
The text was updated successfully, but these errors were encountered:
thescientist13
No branches or pull requests
Currently wcc does not yet offer 100% native edge function runtime support, though the DOM shim itself works just fine. This means that although Edge functions are a little more DIY than serverless, it is still possible.
With wcc supporting this out of the box, we can remove some of the extra boilerplate from the edge demo examples.
The text was updated successfully, but these errors were encountered: