diff --git a/src/resolvers.ts b/src/resolvers.ts index 8e231de4..23f4c8ee 100644 --- a/src/resolvers.ts +++ b/src/resolvers.ts @@ -28,7 +28,8 @@ export const resolveContentPaths = (srcDir: string, nuxt = useNuxt()) => { const extensionFormat = (s: string[]) => s.length > 1 ? `.{${s.join(',')}}` : `.${s.join('') || 'vue'}` const defaultExtensions = extensionFormat(['js', 'ts', 'mjs']) - const sfcExtensions = extensionFormat(nuxt.options.extensions.map(e => e.replace(/^\.*/, ''))) + const extensions = Array.from(new Set(['vue', ...nuxt.options.extensions])) + const sfcExtensions = extensionFormat(Array.from(new Set(['vue', ...nuxt.options.extensions])).map(e => e.replace(/^\.*/, ''))) const importDirs = [...(nuxt.options.imports?.dirs || [])].map(r) const [composablesDir, utilsDir] = [resolve(srcDir, 'composables'), resolve(srcDir, 'utils')]