8000 fix(open-api): load virtual files from rollup rather than fs by danielroe · Pull Request #3324 · nitrojs/nitro · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(open-api): load virtual files from rollup rather than fs #3324

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

Merged
merged 2 commits into from
Apr 18, 2025

Conversation

danielroe
Copy link
Member

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 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 addresses an issue found by @atinux in nuxt-ui-pro/chat#10.

minimal reproduction: https://stackblitz.com/edit/github-eddeyrez?file=nitro.config.ts

the issue is that the handlersMeta plugin always tries to load files from disk, but in some cases this is impossible. We bail out if a null byte is detected, which will cover nitro virtual files as well as any virtual files present from other plugins.

📝 Checklist

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

@danielroe danielroe self-assigned this Apr 18, 2025
@danielroe danielroe requested a review from pi0 as a code owner April 18, 2025 13:15
Copy link

Deploying nitrojs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 702df41
Status:⚡️  Build in progress...

View logs

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.

Thnx!

@pi0 pi0 merged commit f8d11de into v2 Apr 18, 2025
4 of 5 checks passed
@pi0 pi0 deleted the fix/open-api-virtual branch April 18, 2025 13:17
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.

2 participants
0