Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cloudflare-pages): exclude assets from function call #965

Merged
merged 12 commits into from
Feb 21, 2023

Conversation

danielroe
Copy link
Collaborator

πŸ”— Linked issue

#497

❓ 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)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

We can generate a _routes.json file to prevent hits on assets directories from hitting the function at all. We might also be able to add individual assets that are outside of these directories to the json but this runs the risk of hitting the 100 rule limit. (Maybe we can allow extending the default config, suggested by @ColonelBundy.)

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe danielroe added the enhancement New feature or request label Feb 20, 2023
@danielroe danielroe self-assigned this Feb 20, 2023
@codecov
Copy link

codecov bot commented Feb 20, 2023

Codecov Report

Merging #965 (92e106d) into main (b11a0c4) will increase coverage by 0.19%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #965      +/-   ##
==========================================
+ Coverage   67.59%   67.78%   +0.19%     
==========================================
  Files          59       60       +1     
  Lines        6030     6128      +98     
  Branches      679      689      +10     
==========================================
+ Hits         4076     4154      +78     
- Misses       1945     1965      +20     
  Partials        9        9              
Impacted Files Coverage Ξ”
src/presets/cloudflare.ts 88.03% <100.00%> (+25.73%) ⬆️
src/rollup/plugins/externals.ts 94.31% <0.00%> (-0.02%) ⬇️
src/presets/index.ts 100.00% <0.00%> (ΓΈ)
src/presets/lagon.ts 30.95% <0.00%> (ΓΈ)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@pi0 pi0 changed the title feat(cloudflare-pages): exclude assets from function call fix(cloudflare-pages): exclude assets from function call Feb 21, 2023
Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@pi0 pi0 merged commit c82287a into main Feb 21, 2023
@pi0 pi0 deleted the fix/cloudflare-assets branch February 21, 2023 12:32
DataDrivenMD added a commit to Distal-Labs/elk that referenced this pull request Feb 21, 2023
[X] Updated cloudflare pages deployment guide to reflect nitrojs/nitro#965

[X] Updated Github Actions workflow to use `NITRO_PRESET=cloudflare_pages`
DataDrivenMD added a commit to Distal-Labs/elk that referenced this pull request Mar 11, 2023
[X] Updated cloudflare pages deployment guide to reflect nitrojs/nitro#965

[X] Updated Github Actions workflow to use `NITRO_PRESET=cloudflare_pages`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants