File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ export default defineNuxtModule<ModuleOptions>({
2323 const { resolve } = createResolver ( import . meta. url )
2424 const runtimeDir = resolve ( './runtime' )
2525
26+ // Public runtime config
27+ nuxt . options . runtimeConfig . public . notion = defu ( nuxt . options . runtimeConfig . public . notion , {
28+ apiBase : options . apiBase ,
29+ } )
30+
2631 // Private runtime config
2732 nuxt . options . runtimeConfig . notion = defu ( nuxt . options . runtimeConfig . notion , options )
2833
Original file line number Diff line number Diff line change 11import { Client } from '@notionhq/client'
22import type { Ref } from 'vue'
3- import { defineNuxtPlugin , useAsyncData , useRuntimeConfig } from '#app '
3+ import { defineNuxtPlugin , useAsyncData , useRuntimeConfig } from '#imports '
44
55export default defineNuxtPlugin ( {
66 name : 'nuxt-notion-cms' ,
77 enforce : 'pre' ,
8- async setup ( ) {
9- const config = useRuntimeConfig ( ) . notion
8+ setup ( ) {
9+ const config = useRuntimeConfig ( ) . public . notion
1010
1111 const notionFetch = $fetch . create ( {
1212 baseURL : config . apiBase ,
You can’t perform that action at this time.
0 commit comments