[Vuejs]-How to extend NuxtRuntimeConfig interface in typescript

3👍

You’re almost there!

The module you have to use to trigger the interface merging is actually the path to the types file. So here, it’s @nuxt > types > config > runtime.d.ts

declare module '@nuxt/types/config/runtime' {
  interface NuxtRuntimeConfig {
    baseUrl: string
  }
}

Leave a comment