Open jay-aye-see-kay opened 3 months ago
Hi,
Thank you for the feature request.
We plan to implement new features also based on what the customers are asking for.
1 - I'm not sure I get what you meant by but these are not defaults
regarding Nextjs. Indeed there is no support yet for Remix but Nextjs is already available.
2 - We tried to make the CLI very flexible so there are currently 2 options to extend the functionality of the CLI:
2.1 After running cloudfront-hosting-toolkit
the CLI copies 3 files to your local_folder:
cloudfront-hosting-toolkit/cloudfront-hosting-toolkit-config.yml
with the build configuration
cloudfront-hosting-toolkit/cloudfront-hosting-toolkit-cff.js
with the source code of the CloudFront Function for URL rewriting
cloudfront-hosting-toolkit/cloudfront-hosting-toolkit-cff.json
with the settings about the repository and selected features.
These files will be used for any subsequent deployment of that project (unless you remove them and in that case you need to run the init
command again.
If the configuration in those files it not a perfect fit for your project, you can always modify those local files and execute the deploy
command again to use your new configuration the changes. The configuration is a default one but it may not be a perfect fit for all projects so that's why we wanted to give you the chance to overwrite it if needed.
2.2 You also have the option to "bring you own framework" (read more about it) which means you can simply provide those 3 files to match your framework and run the init
command to use your configuration.
Doing this could be a great way to test a new configuration for a non supported framework and if you want, even create a PR to integrate this new framework in the CLI.
3 - We plan to support SSR but we did not start working on it. It depends also on what the customers are asking so we can prioritize.
I hope I was able to clarify these points. If you have any other question, feel free to ask.
Exciting to see a new tool in this space.
Use case
As a someone interested in this tool I'd like to know about current and planned support for the "default" next.js and and remix support
Solution/User Experience
Next.js and Remix docs both nudge devs to a architecture that includes a lambda. Next has "static export" and Remix has "spa mode" which are compatible with
cloudfront-hosting-toolkit
now - but these are not defaults.Make current and planned support clearer in the readme or roadmap.
Alternative solutions
No response
Other thoughts
I can see in the roadmap there are plans to support SSR. Does this include running code on lambdas like next.js' api routes or remix (not spa mode)?
Hosting next.js serverlessly is notoriously difficult, so I'd understand if that wasn't planned 😅. Remix is supposed to much easier, though I haven't done it myself.