Emanuel
Emanuel
NNuxt
Created by Emanuel on 9/12/2024 in #❓・help
Nuxt 3 Modules export custom objects
How can I export objects from modules so that I can import them in a Nuxt 3 application? The module namespace seems to resolve to ".../types"
1 replies
NNuxt
Created by Emanuel on 8/14/2024 in #❓・help
How do you properly export Enums in Modules?
Exported Enums seems to be interpreted as types thus throwing Errors in the Main Application
1 replies
NNuxt
Created by Emanuel on 6/24/2024 in #❓・help
CommonJS not transpiled to esm
I wrote a custom Nuxt 3 Module which imports and initializes a plugin which again uses a package writte in CJS. My problem is that when I use the module I get errors related to CJS not being able to be interpreted. When I add my module to the "build.transpile" option in nuxt.config.ts is still does not work. Any ídeas? I also tried to add the npm package which causes the error directly but also this does not work.
1 replies
NNuxt
Created by Emanuel on 6/21/2024 in #❓・help
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"
4 replies