From df53978cd31d0ffd54760b6ca88737da479bdb46 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 16 Feb 2021 20:44:52 +0000 Subject: [PATCH] fix: exclude .d.ts files from `@nuxt/components` treatment closes #68 --- src/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index a457499a..d5c635b0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -144,8 +144,11 @@ const nuxtModule: Module = 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'], + }) }) }