File tree Expand file tree Collapse file tree 5 files changed +15
-15
lines changed Expand file tree Collapse file tree 5 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 5151 "dependencies" : {
5252 "@nuxt/kit" : " ^3.0.0-rc.11" ,
5353 "defu" : " ^6.1.0" ,
54- "kirby-fest" : " ^0.2 .0" ,
54+ "kirby-fest" : " ^0.3 .0" ,
5555 "ohash" : " ^0.1.5" ,
5656 "ohmyfetch" : " ^0.4.19" ,
5757 "scule" : " ^0.3.2"
Original file line number Diff line number Diff line change @@ -5,4 +5,3 @@ import { site } from '#build/kql'
55<template >
66 <pre >{{ JSON.stringify(site) }}</pre >
77</template >
8-
Original file line number Diff line number Diff line change @@ -18,4 +18,3 @@ const { data } = await useKql({
1818<template >
1919 <pre >{{ JSON.stringify(data) }}</pre >
2020</template >
21-
Original file line number Diff line number Diff line change @@ -111,11 +111,21 @@ export default defineNuxtModule<ModuleOptions>({
111111 logger . warn ( 'Missing `KIRBY_API_TOKEN` in `.env` for bearer authentication' )
112112
113113 // Private runtime config
114+ // @ts -expect-error: prefetch queries of playground break assignment
114115 nuxt . options . runtimeConfig . kql = defu (
115116 nuxt . options . runtimeConfig . kql ,
116117 options ,
117118 )
118119
120+ // Write data to public runtime config if client requests are enabled
121+ if ( options . clientRequests ) {
122+ // @ts -expect-error: prefetch queries of playground break assignment
123+ nuxt . options . runtimeConfig . public . kql = defu (
124+ nuxt . options . runtimeConfig . public . kql ,
125+ options ,
126+ )
127+ }
128+
119129 // Transpile runtime
120130 const { resolve } = createResolver ( import . meta. url )
121131 nuxt . options . build . transpile . push ( resolve ( 'runtime' ) )
@@ -220,13 +230,5 @@ declare module '#nuxt-kql' {
220230 . join ( '\n' )
221231 } ,
222232 } )
223-
224- // Write data to public runtime config if client requests are enabled
225- if ( options . clientRequests ) {
226- nuxt . options . runtimeConfig . public . kql = defu (
227- nuxt . options . runtimeConfig . public . kql ,
228- options ,
229- )
230- }
231233 } ,
232234} )
You can’t perform that action at this time.
0 commit comments