Skip to content

Commit

Permalink
fix: remove extension from import sources (#67)
Browse files Browse the repository at this point in the history
This fixes an issue (introduced in 5401fdd), which prevents typescript from seeing the module when the .mjs file is not generated, but .d.ts is.
  • Loading branch information
killjoy1221 committed Mar 18, 2024
1 parent 123eaf3 commit 8c471c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export const ${getRawComposableName(i)} = (...args) => _$api('${i}', ...args)

// Add Nuxt auto-imports for generated composables
addImportsSources({
from: resolve(nuxt.options.buildDir, `module/${moduleName}.mjs`),
from: resolve(nuxt.options.buildDir, `module/${moduleName}`),
imports: endpointKeys.flatMap(i => [getRawComposableName(i), getDataComposableName(i)]),
})

Expand Down

0 comments on commit 8c471c7

Please sign in to comment.