Configuration
Nuxt Pages Plus provides a bunch of options to configure your parallel routes as you like in nuxt.config
.
export default defineNuxtConfig({
pagesPlus: {
// Nuxt Pages Plus configuration
}
})
separator
- Type:
string
- Default:
@
The separator is used to split the parallel route name and the page name. Please read the Directory Structure > Escape @ eparator for more information.
parallelPages
- Type:
Record<string, ParallelPageOptions>
- Default:
{}
You can configure every parallel route in your project using this option.
The key
is the parallel route name, for example you have a ~/pages/@foo
parallel route, the key should be foo
.
ParallelPageOptions
interface ParallelPageOptions {
mode: 'sync' | 'sync-once' | 'manual' // default: 'sync'
index?: string // default: undefined
fallback: boolean | { redirect?: string } // default: true
}
mode
- Type:
'sync' | 'sync-once' | 'manual'
- Default:
sync
The sync mode of the parallel route. Please read the Parallel Routes > Sync Modes for more information.
index
- Type:
string | undefined
- Default:
/~index
The index page of the parallel route. Please read the Parallel Routes > Fallback Mechanism for more information.
fallback
- Type:
boolean | { redirect?: string }
- Default:
true
The fallback mechanism of the parallel route. Please read the Parallel Routes > Fallback Mechanism for more information.