Skip to content

fix: ensure @nuxt/content layer compatibility and update deprecated imports#18

Merged
amondnet merged 2 commits intomainfrom
fix/nuxt-content-layer-compatibility
Dec 22, 2025
Merged

fix: ensure @nuxt/content layer compatibility and update deprecated imports#18
amondnet merged 2 commits intomainfrom
fix/nuxt-content-layer-compatibility

Conversation

@amondnet
Copy link
Copy Markdown
Contributor

Summary

This PR ensures the @pleaseai/docs layer works correctly when imported as a dependency in other Nuxt projects by fixing @nuxt/content compatibility issues.

Changes

  • Add extendViteConfig: Import and configure Vite optimizeDeps for @nuxt/content/slugify to enable proper tree-shaking in consuming projects
  • Update deprecated imports: Replace @nuxt/content/nitro with @nuxt/content/server (deprecated in newer @nuxt/content versions)
  • Remove duplicate module: Eliminate duplicate nuxt-og-image entry in modules array
  • Fix formatting: Correct indentation in modules array for consistency

Test Plan

  • Build the layer package: cd packages/layer && bun build
  • Type check the layer: cd packages/layer && bun typecheck
  • Verify docs site builds: bun build (from root)
  • Test layer import in consuming app: extends: ['@pleaseai/docs'] works correctly
  • Verify @nuxt/content API endpoints function properly

…mports

- Add extendViteConfig import and configure optimizeDeps for @nuxt/content/slugify
- Update deprecated @nuxt/content/nitro import to @nuxt/content/server
- Remove duplicate nuxt-og-image module from modules array
- Fix indentation in modules array for consistency

This ensures the @pleaseai/docs layer works correctly when imported as a dependency in other Nuxt projects.
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @amondnet, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the compatibility and maintainability of the @pleaseai/docs layer. It addresses specific @nuxt/content integration challenges by optimizing dependency handling with Vite and cleans up the module configuration, ensuring the layer functions seamlessly when extended by other Nuxt applications.

Highlights

  • Nuxt Content Layer Compatibility: Implemented extendViteConfig to configure Vite's optimizeDeps for @nuxt/content > slugify. This ensures proper tree-shaking and compatibility when the @pleaseai/docs layer is consumed as a dependency in other Nuxt projects.
  • Module Configuration Cleanup: Removed a duplicate nuxt-og-image entry from the modules array and corrected indentation for improved code consistency and readability within the nuxt.config.ts file.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@amondnet amondnet self-assigned this Dec 22, 2025
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request addresses compatibility issues for the @pleaseai/docs Nuxt layer, ensuring it works correctly as a dependency. The changes include removing a duplicate module, fixing formatting inconsistencies, and adding necessary Vite configuration for @nuxt/content dependencies. The core logic is sound. I have provided one suggestion to enhance the robustness and readability of the new Vite configuration logic in nuxt.config.ts.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Dec 22, 2025

Deploying docs-please with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0de7342
Status:⚡️  Build in progress...

View logs

@amondnet amondnet merged commit 1099ea0 into main Dec 22, 2025
1 check was pending
@amondnet amondnet deleted the fix/nuxt-content-layer-compatibility branch December 22, 2025 05:42
@sonarqubecloud
Copy link
Copy Markdown

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