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

feat: support app config #1022

Merged
merged 5 commits into from Mar 6, 2023
Merged

feat: support app config #1022

merged 5 commits into from Mar 6, 2023

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Mar 6, 2023

πŸ”— Linked issue

#728

❓ 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

App config, is an alternative to runtime config for bundled application wide configuration. It's main distinction from runtime config is that it supports development HMR and any js value time (while runtime config is limited to JSON serializable ones).

By default app.config.{ext} is scanned from all layer's srcDir. Additional app configs to be merged, can be specified by appConfigFiles: [] option and appConfig can be used for inlined app config (sharing serialization limitations. Normal file is always better and recommended)

πŸ“ Checklist

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

@codecov
Copy link

codecov bot commented Mar 6, 2023

Codecov Report

Merging #1022 (fbfc72b) into main (a5c5a48) will decrease coverage by 0.04%.
The diff coverage is 74.46%.

❗ Current head fbfc72b differs from pull request most recent head a9d97c5. Consider uploading reports for the commit a9d97c5 to get more accurate results

@@            Coverage Diff             @@
##             main    #1022      +/-   ##
==========================================
- Coverage   67.67%   67.63%   -0.04%     
==========================================
  Files          61       62       +1     
  Lines        6171     6266      +95     
  Branches      694      707      +13     
==========================================
+ Hits         4176     4238      +62     
- Misses       1985     2015      +30     
- Partials       10       13       +3     
Impacted Files Coverage Ξ”
src/build.ts 43.60% <28.57%> (-1.03%) ⬇️
src/utils/index.ts 49.54% <58.82%> (-4.69%) ⬇️
src/options.ts 87.50% <90.47%> (+0.73%) ⬆️
src/rollup/config.ts 88.42% <100.00%> (+0.10%) ⬆️
src/rollup/plugins/app-config.ts 100.00% <100.00%> (ΓΈ)
src/types/nitro.ts 100.00% <100.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 marked this pull request as ready for review March 6, 2023 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant