Open avxkim opened 3 months ago
You can use nuxt.options.icon.size = '24px
@avxkim
@Atinux then i have to use useRuntimeConfig()
in a component?
i did this way:
module.ts
nuxt.options.runtimeConfig.public.iconSize =
options.iconSize
then in a component
const config = useRuntimeConfig()
const iconSize = computed(
() => props.size || config.public.iconSize
)
is that ok?
Oh my bad I just saw that we are using the app.config.ts
for the configuration.
Could you try with nuxt.options.appConfig.icon.size = '24px'
?
Cannot start nuxt: Cannot set properties of undefined (setting 'size')
@Atinux is doing this
nuxt.options.runtimeConfig.public.iconSize =
options.iconSize
considerd as a bad practice?
You can do this yes
module.ts
But
inlineOptions
doesn't work, when i'm enabling this module inside a custom module.