Skip to main content
Nuxt Bridge is highly configurable, allowing you to enable or disable features as needed during your migration to Nuxt 3.

Feature Flags

You can optionally disable some features from Bridge or opt-in to less stable ones. In normal circumstances, it is always best to stick with defaults! You can check bridge/src/module.ts for latest defaults.
nuxt.config.ts

Configuration Options

vite

Enable Vite as your bundler instead of webpack 4:
Benefits:
  • Faster dev server startup
  • Faster hot module replacement (HMR)
  • Better development experience

meta

Enable Nuxt 3 compatible useHead composable:
This allows you to use the new useHead composable for managing meta tags.

nitro

Enable the Nitro server engine:
Benefits:
  • Improved server performance
  • Better deployment options
  • API route improvements
  • Nuxt 3 compatibility

typescript

Enable TypeScript support with optional esbuild transpilation:

capi

Configure Composition API support:

macros

Enable compiler macros like definePageMeta:

imports

Configure auto-imports:

scriptSetup

Enable <script setup> support:

transpile

Configure module transpilation:

constraints

Control module compatibility warnings:

Migration of Specific Options

router.base → app.baseURL

The router.base option has been moved to app.baseURL:
nuxt.config.ts

build.publicPath → app.cdnURL

The build.publicPath option has been moved to app.cdnURL:
nuxt.config.ts
For a smooth migration, we recommend enabling features gradually:

Step 1: Basic Setup

Step 2: Add Nitro

Step 3: Enable Vite

Step 4: Add Modern Features

Troubleshooting

Module Compatibility Issues

If you encounter module compatibility warnings:

Build Errors

If you encounter build errors after enabling a feature:
  1. Disable the feature temporarily
  2. Clear .nuxt directory: rm -rf .nuxt
  3. Reinstall dependencies: npm install
  4. Try enabling the feature again

TypeScript Errors

If you see TypeScript errors:
  1. Run nuxi prepare to regenerate types
  2. Restart your IDE/editor
  3. Check tsconfig.json extends .nuxt/tsconfig.json

Configuration Examples

Minimal Configuration

For a minimal Bridge setup:
For a complete Bridge setup with all features:

Next Steps

After configuring Bridge:
  • Test your application thoroughly
  • Gradually enable more features
  • Monitor for compatibility issues
  • Prepare for full Nuxt 3 migration