DruxtRouterNuxtModule
DruxtRouterNuxtModule()
The Nuxt.js module function.
- Extends the Vue router, adding the Druxt wildcard route.
- Adds the Druxt router plugin.
- Adds the Druxt router Vuex store.
The module function should not be used directly, but rather installed via your Nuxt configuration file.
Options are set on the root level druxt Nuxt config object.
Kind: global function
Properties
| Name | Type | Description |
|---|---|---|
| options.druxt | object | Druxt root level options. |
| options.druxt.baseUrl | string | Base URL of Drupal JSON:API backend. |
| options.druxt.router.component | string | File to custom Router component. |
Example
// `nuxt.config.js`
module.exports = {
buildModules: ['druxt-router/nuxt'],
druxt: {
baseUrl: 'https://demi-api.druxtjs.org'
}
}