Documentation Index
Fetch the complete documentation index at: https://mintlify.com/cloudflare/vinext/llms.txt
Use this file to discover all available pages before exploring further.
Overview
vinext aims to be compatible with the Next.js ecosystem. Libraries that only import fromnext/* public APIs tend to work out of the box. Libraries that depend on Next.js build plugins or internal APIs may need custom shimming.
Compatibility Pattern: Libraries importing from documented
next/* modules → ✅ WorksLibraries requiring Next.js build plugins → ⚠️ Needs integration workVerified Compatible Libraries
These libraries have been tested and work with vinext:UI and Theming
next-themes
Status: ✅ Full Support- ThemeProvider
useThemehook- SSR script injection
suppressHydrationMismatchhandling- All theme strategies (class, data-attribute, etc.)
State Management
nuqs (Next.js URL query state)
Status: ✅ Full SupportuseQueryStatehookuseQueryStatesfor multiple params- Shallow routing
- SSR with search params
next/navigation.js (with .js extension). vinext’s resolveId hook strips the extension and redirects through the shim map.
Content Management
MDX Support
Status: ✅ Via @mdx-js/rollup.mdxfiles inapp/directory- MDX components
- Front matter (via remark plugins)
- Syntax highlighting (via rehype plugins)
@mdx-js/rollup automatically in most cases.
Nextra (Documentation)
Status: ✅ With Port Nextra’s webpack plugin doesn’t work with Vite, but the content can be ported. See the live example. Approach:- Keep MDX content
- Use
@mdx-js/rollupfor MDX processing - Build lightweight navigation/layout components
- Configure Tailwind for styling
Image Processing
@unpic/react
Status: ✅ Built-in vinext uses @unpic/react internally fornext/image remote image support.
- Cloudflare Images
- Cloudinary
- Imgix
- Vercel
- And 24 more…
Libraries Requiring Integration Work
next-intl (Internationalization)
Status: ⚠️ Requires Deep Integration next-intl expects a plugin fromnext.config.ts (createNextIntlPlugin) that injects configuration at build time. Simply installing and importing doesn’t work.
Issue: The plugin architecture is Next.js-specific and injects webpack plugins.
Potential workaround: Manual configuration of middleware and context providers, but this doesn’t provide full feature parity.
Prisma (Database ORM)
Status: ⚠️ Cloudflare Compatibility Required Prisma works with vinext in general, but requires Prisma’s Accelerate or Data Proxy for Cloudflare Workers deployment (Prisma generates Node.js-specific binaries by default).- Prisma with D1 adapter
- Prisma Accelerate
- Prisma Data Proxy
- Direct Prisma Client (native binary) on Cloudflare Workers
tRPC
Status: ⚠️ Partial - Needs Testing tRPC should work with vinext since it uses standard Next.js APIs, but comprehensive testing hasn’t been done yet. Expected to work:- API route handlers
- React Server Components integration
- Client-side calls
- SSR with tRPC
- Batch requests
- Subscriptions
Library Compatibility Patterns
✅ Works Out of Box
Libraries that:- Only import from documented
next/*modules - Don’t require webpack loaders
- Don’t modify Next.js build process
- Use standard React patterns
⚠️ Needs Configuration
Libraries that:- Require Vite plugin equivalents of webpack loaders
- Need environment-specific adapters (Cloudflare vs Node.js)
- Have optional build-time optimizations
❌ Requires Porting
Libraries that:- Deeply integrate with Next.js build plugins
- Modify webpack config internally
- Depend on Next.js internals
- Require compile-time code generation
Testing a Library
To test if a library works with vinext:- Install the library
- Import and use it normally
- Run the dev server
- Check for errors
- Module resolution errors → May need Vite plugin or alias
- Build plugin errors → May need manual configuration or porting
- Runtime errors → Check Cloudflare Workers compatibility
Reporting Library Compatibility
If you test a library with vinext:-
Open an issue with:
- Library name and version
- What works / what doesn’t
- Any configuration needed
- Reproduction steps
- Consider submitting a PR to add the library to this page
Extension: .js Import Handling
Some libraries (like nuqs) import Next.js modules with.js extensions:
resolveId hook automatically strips .js from next/* imports and redirects through the shim map. This is handled transparently.
Future Work
Libraries we’re tracking for better support:- next-intl: Build plugin integration
- next-auth: Full testing and documentation
- tRPC: Comprehensive testing
- next-seo: Verification with metadata API
- @vercel/analytics: Cloudflare Analytics adapter
Contributing Library Support
To add support for a library:- For simple libraries: Just document the usage pattern
- For libraries needing shims: Add a shim to
packages/vinext/src/shims/ - For libraries needing build plugins: Create a Vite plugin equivalent
- Add tests: Add integration tests to
tests/fixtures/ - Document: Update this page with usage examples