Skip to content

feat(preset): warn if nuxthub is loaded before without database#3405

Merged
farnabaz merged 3 commits intomainfrom
fix/nuxthub_warn
Jun 18, 2025
Merged

feat(preset): warn if nuxthub is loaded before without database#3405
farnabaz merged 3 commits intomainfrom
fix/nuxthub_warn

Conversation

@huang-julien
Copy link
Copy Markdown
Member

🔗 Linked issue

❓ 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

This PR adds and addtionnal check when using nuxt content with nuxthub.

In cases when nuxt content is after nuxthub and nuxthub doesn't have databse enabled, deploying on nuxthub won't update the DB. Because the modification brought to nuxt.options.hub done too late.

export default defineNuxtConfig({
  modules: [
    '@nuxthub/core', // nuxt content should load before nuxthub or the user should enable databse themselves
    "@nuxt/content",
  ]
})

📝 Checklist

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

@huang-julien huang-julien changed the title feat: warn if nuxthub is loaded before without database feat(preset): warn if nuxthub is loaded before without database Jun 14, 2025
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Jun 14, 2025

Deploying content with  Cloudflare Pages  Cloudflare Pages

Latest commit: eb6c97b
Status: ✅  Deploy successful!
Preview URL: https://2033bdee.content-f0q.pages.dev
Branch Preview URL: https://fix-nuxthub-warn.content-f0q.pages.dev

View logs

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jun 14, 2025

npm i https://pkg.pr.new/@nuxt/content@3405

commit: eb6c97b

@huang-julien huang-julien requested a review from farnabaz June 14, 2025 20:09
Comment thread src/presets/nuxthub.ts Outdated
Comment thread src/presets/nuxthub.ts Outdated
Copy link
Copy Markdown
Member

@farnabaz farnabaz left a comment

Choose a reason for hiding this comment

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

Thanks

@farnabaz farnabaz merged commit f689cf0 into main Jun 18, 2025
5 checks passed
@farnabaz farnabaz deleted the fix/nuxthub_warn branch June 18, 2025 12:20
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