Skip to content

feat: support app config#1022

Merged
pi0 merged 5 commits into
mainfrom
feat/app-config
Mar 6, 2023
Merged

feat: support app config#1022
pi0 merged 5 commits into
mainfrom
feat/app-config

Conversation

@pi0

@pi0 pi0 commented Mar 6, 2023

Copy link
Copy Markdown
Member

🔗 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

codecov Bot commented Mar 6, 2023

Copy link
Copy Markdown

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.

1 participant