We want to convert a simple (no authentication, very few routes) preact web app from dynamic client-side rendering to static server-side rendering using NodeJS and "preact-render-to-string".
This task is:
- implement a static router for server-side rendering
- wrap the preact app with a NodeJS function (for AWS Lambda) and change the dynamic "render" to the static "render-to-string" based on a path parameter
- update webpack build script to libraryTarget "commonjs" for "node" target to produce a [login to view URL] file that exports a "handler" promise accepting an "event" object parameter. the handler promise must return a string based on the rawPath property of the event, either a static response (redirect, string, svg), or a rendered response
This task is not:
- re-create the application with NextJS or Gatsby or any other technology
- add Koa or Express or some other middleware
We have a lot of work in different projects and an interesting long-term opportunity for the right person.