feat(preset): Aws lambda edge
π Linked issue
β Type of change
- [ ] π Documentation (updates to the documentation or readme)
- [ ] π Bug fix (a non-breaking change that fixes an issue)
- [ ] π Enhancement (improving an existing functionality like performance)
- [x] β¨ New feature (a non-breaking change that adds functionality)
- [ ] β οΈ Breaking change (fix or feature that would cause existing functionality to change)
π Description
Add AWS Lambda@Edge to the preset.
The current aws-lambda preset is not compatible with the Lambda@Edge This option is one of the most cost-effective on cloud technologies, it is much faster and more effective than "API Gateway". I take WinterYukky job as a base, focusing more on ".output/server/index.mjs" and removing the zero config functionalities as there are several CloudFormation templates to deploy, leaving a simpler option to implement inside your CI/CD.
Resolves #79
π Checklist
- [ ] I have linked an issue or discussion.
- [x] I have updated the documentation accordingly.
Live Preview ready!
| Name | Edit | Preview | Latest Commit |
|---|---|---|---|
| nitro | Edit on Studio βοΈ | View Live Preview | b5b8599b885b83e3ac50378aa899b4f6b7372269 |
Codecov Report
Merging #1075 (b5b8599) into main (1d0c120) will increase coverage by
0.01%. The diff coverage is100.00%.
@@ Coverage Diff @@
## main #1075 +/- ##
==========================================
+ Coverage 76.64% 76.66% +0.01%
==========================================
Files 71 72 +1
Lines 7241 7247 +6
Branches 723 723
==========================================
+ Hits 5550 5556 +6
Misses 1690 1690
Partials 1 1
| Impacted Files | Coverage Ξ | |
|---|---|---|
| src/presets/aws-lambda-edge.ts | 100.00% <100.00%> (ΓΈ) |
|
| src/presets/cloudflare-module.ts | 100.00% <100.00%> (ΓΈ) |
|
| src/presets/cloudflare.ts | 100.00% <100.00%> (ΓΈ) |
|
| src/presets/index.ts | 100.00% <100.00%> (ΓΈ) |
@pi0 can we get this PR merged soon ?
@pi0 @danielroe can we get a review and merge of this pr soon ?
Hey @pi0 do we have plans to get this merged for the next release? Our team is looking forward to use it.
This is looking very good, and it also would be a compatible with SST as demonstrated here https://github.com/jdevdevdev/nuxt-sst/blob/lambda-edge/nuxt-app/server/nitro/preset/entry.ts
@pi0 Some presets such as vercel and netlify have multiple presets, while some like cloudflare and azure don't, so I'm not sure what to do here.