Skip to content

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

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 3 commits into from
Jun 18, 2025

Conversation

huang-julien
Copy link
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
Copy link

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

Copy link

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
huang-julien and others added 2 commits June 16, 2025 18:25
Co-authored-by: Farnabaz <farnabaz@gmail.com>
Copy link
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