Skip to content

Commit

Permalink
fix: always include vue extension in SFC content paths (#752)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjpearson authored Nov 3, 2023
1 parent fd43a0e commit 296f20a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]))

Check warning on line 31 in src/resolvers.ts

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, 18)

'extensions' is assigned a value but never used
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')]
Expand Down

0 comments on commit 296f20a

Please sign in to comment.