Ya'll, so I created a `RemixSite` construct within...
# general
s
Ya'll, so I created a
RemixSite
construct within a fork of
@serverless-stack/resources
. It is working. šŸŽ‰ It's deploying to CloudFront Lambda@Edge, much like the Next.js stack. It runs against a "vanilla" Remix build - i.e. one that has just been configured to use the
Remix App Server
option. This build doesn't include any "Architect" (or other cloud provider) references. The
RemixSite
construct will wrap the build with a Lambda@Edge compatible handler and then bundles it using ESBuild.
t
woah!
that's awesome I think we'd love to add that in officially
s
That's great to hear!
I've built it in a way that I keep the code very in line with the Nextjs implementation, as there is a ton of shared code. I didn't want to prematurely abstract though, but keeping it as similar as possible will allow you to do a file diff and see where the cross over is. Some of it definitely should be abstracted while a lot of it could probably be safer to keep as duplicate. Wanted to keep that work open for discussion and set out associated tasks.
It supports all the same stuff in the Nextjs construct in terms of environment variables, custom domains, function overrides, any base region deployment etc.
If you are keen I can work towards a PR so yourselves and the community can give it a wider consideration.
I think the Architect implementation runs on API Gateway, so a possible one-up there. šŸ˜œ
t
very nice
would love a PR, @Frank knows the nextjs construct best so he'll likely review it
s
Yeah, I constantly saw his name in the GitLens provided meta.
Ok, I'll try get one together within the coming days. šŸ‘
d
This is great to hear and Iā€™m looking forward to it.