Skip to content

Commit

Permalink
fix: exclude .d.ts files from @nuxt/components treatment
Browse files Browse the repository at this point in the history
closes #68
  • Loading branch information
danielroe committed Feb 16, 2021
1 parent 39861da commit df53978
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,11 @@ const nuxtModule: Module<SanityModuleOptions> = function (moduleOptions) {
})

if (autoregister) {
this.nuxt.hook('components:dirs', (dirs: string[]) => {
dirs.push(join(__dirname, 'components'))
this.nuxt.hook('components:dirs', (dirs: Array<{ path: string, extensions?: string[] }>) => {
dirs.push({
path: join(__dirname, 'components'),
extensions: ['js'],
})
})
}

Expand Down

0 comments on commit df53978

Please sign in to comment.