google-adsense
google-adsense copied to clipboard
Warning: `withDefaults()` is unnecessary when using `defineProps()` with destructuring
I am encountering a warning when using the @nuxtjs/google-adsense
module in my Nuxt 3 project. The warning indicates that withDefaults()
is unnecessary when defineProps()
is used with destructuring. Here are the details:
Warning Message:
WARN [@vue/compiler-sfc] withDefaults() is unnecessary when using destructure with defineProps().
Reactive destructure will be disabled when using withDefaults().
Prefer using destructure default values, e.g., const { foo = 1 } = defineProps(...).
node_modules/@nuxtjs/google-adsense/dist/runtime/components/Adsbygoogle.vue
11 | hideUnfilled,
12 | includeQuery,
13 | } = withDefaults(defineProps<{
| ^^^^^^^^^^^^
14 | adClient?: string
15 | adSlot?: string | null
Environment:
Nuxt Version: ^3.14.1592 Module Version: "^3.0.0", Node Version: v20.15.0