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(nuxt): support app config for server routes #19489

Merged
merged 14 commits into from Mar 14, 2023
Merged

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Mar 6, 2023

πŸ”— Linked issue

#14670 via unjs/nitro#1022

❓ 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)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This feature supports useAppConfig for nitro server routes and seamless integration with nuxt (public) app.config.ts in project's root level. In addition to this nitro also supports server/app.config.ts for private app config.

(pending nitropack release made PR early to preview)

Next steps

  • Bundle app config only once to the server. Currently it bundles to both vite server and nitro server while nitro could expose it for vite on (production build) for server-side.
  • Allow to explicitly provide private app.config, (we might think about a new server.config/serverConfig however there might be better alternatives we could think later)

πŸ“ Checklist

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

@codesandbox
Copy link

codesandbox bot commented Mar 6, 2023

CodeSandbox logoCodeSandbox logoΒ  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@pi0 pi0 marked this pull request as ready for review March 13, 2023 19:36
@danielroe danielroe merged commit e84ec61 into main Mar 14, 2023
10 checks passed
@danielroe danielroe deleted the feat/server-app-config branch March 14, 2023 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants