N
Nuxt6mo ago
Emanuel

Nuxt 3 Modules provide Types to Nuxt Applications

What is the recommended way to provide types from a nuxt 3 module to a Nuxt App so that the App can import it using something like import type someType from "@company/myModule"? Ways I found: 1. export all types inside the module.ts 2. wrap the type exports into a export/declare module "@company/myModule"
3 Replies
Emanuel
EmanuelOP6mo ago
Sadly with addTypeTemplate I am only able to import types with path "#build/...." I would like to import directly with "myModuleNameInNodeModulesFolder"
rrd
rrd5mo ago
You can do it with one of the addimport variations. I used addServerImports and it almost solved this. Did you find a better solution?
Want results from more Discord servers?
Add your server