Skip to content

Commit dc9d8d2

Browse files
committed
chore: update druxt config
1 parent 7c2b493 commit dc9d8d2

File tree

1 file changed

+65
-4
lines changed

1 file changed

+65
-4
lines changed

nuxt/nuxt.config.js

Lines changed: 65 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,72 @@ export default {
4545

4646
// DruxtJS: https://druxtjs.org
4747
druxt: {
48+
// The baseUrl of the Druxt enabled Drupal JSON:API server.
4849
baseUrl,
49-
// Disable deprecated Entity fields.
50-
entity: { components: { fields: false }},
51-
// Set the default theme to render Site regions.
52-
site: { theme: 'olivero' },
50+
51+
// Set the JSON:API endpoint, `/jsonapi` by default.
52+
// endpoint: '/jsonapi'
53+
54+
// DruxtEntity module settings; https://druxtjs.org/modules/entity
55+
entity: {
56+
// Disable the deprecated DruxtField components.
57+
components: { fields: false },
58+
59+
query: {
60+
// Enable Drupal display mode schema based filtering of the JSON:API
61+
// resource to reduce query size.
62+
// schema: true,
63+
},
64+
},
65+
66+
// DruxtMenu module settings; https://druxtjs.org/modules/menu
67+
menu: {
68+
// Disable JSON:API Menu Items support. Enabled by the DruxtSite module.
69+
// jsonApiMenuItems: false
70+
},
71+
72+
// Druxt proxy settings.
73+
proxy: {
74+
// Proxy the JSON:API request via the Nuxt proxy to prevent CORS issues.
75+
api: true
76+
77+
// Proxy the Drupal files system, using `sites/default/files` by default.
78+
// Disable the proxy, or set a specific site to proxy.
79+
// files: 'domain.tld'
80+
},
81+
82+
// DruxtRouter module settings; https://druxtjs.org/modules/router
83+
router: {
84+
// Experimental; Disable the DruxtRouter page middleware, removing routing
85+
// requests and server side redirects. Doing this allows Full Static
86+
// builds without the need of a live Drupal backend. The Route is still
87+
// is retrieved by the fetch hook instead.
88+
middleware: false
89+
90+
// Disable the wildcard router, which is enabled by default in the
91+
// DruxtSite module. This allows more fine grained control over your
92+
// routing.
93+
// wildcard: false
94+
},
95+
96+
// DruxtSite module settings; https://druxtjs.org/modules/site
97+
site: {
98+
// Disable the DruxtSite default layout.
99+
// layout: false,
100+
101+
// Set the backend theme for DruxtBlock layouts.
102+
theme: 'olivero'
103+
},
104+
105+
// DruxtViews module settings; https://druxtjs.org/modules/views
106+
views: {
107+
query: {
108+
// Filter the View results using the Views bundle filter, if available.
109+
// This reduces requests to just ID and type, and can be done manually
110+
// if the bundle filter has not been set in Drupal.
111+
bundleFilter: true,
112+
}
113+
}
53114
},
54115

55116
// Build Configuration: https://go.nuxtjs.dev/config-build

0 commit comments

Comments
 (0)