Update examples stack to use SST
https://github.com/opennextjs/opennextjs-aws/blob/main/examples/sst/stacks/AppRouter.ts#L4
We're currently using a custom CDK implementation (this was before ion released,) we should switch over to ion since that's what most people are using (coming from SST.)
ref: sst nextjs docs
@conico974 @sommeeeer thoughts?
I think we should do it. Should be pretty straight forward, however app-pages-router might need some changes. Currently its using splitted functions which is not supported in latest SST. After they changed the routing logic to be in a cloudfront function instead of cloudfront behaviors. From version >=3.10 its not working anymore.
You can see the splitted function here: https://github.com/opennextjs/opennextjs-aws/blob/9a83eb754ca82f830b1cc06d2d1470cd19173e0b/examples/app-pages-router/open-next.config.ts#L3-L8
Was that intentional that the sst 3.10+ no longer supports splitted functions?
Was that intentional that the sst 3.10+ no longer supports splitted functions?
Yeah, or you can actually read the Discord thread when it was released. I think its possible to make it work, but it would require some changes in SST. Especially ssr-site.ts and nextjs.ts
I think if we switch to ion, we should rewrite the whole e2e stuff to run locally first. Ion doesn't support everything (splitted functions, lambda@edge, external middleware...), so i wouldn't move everything there either.
If we want to do that, we should do it properly so if I had to make a plan here, it would be :
- Make e2e work locally so that we can run CI for it on every PR (not only on main)
- Move like one app to the default ion construct (we can use multiple config file)
- Build new more complex construct for the other apps (something like here https://github.com/conico974/open-next-deploy)