Hi,
I am new to building packages. I am trying to create a small UI lib. I want to create a nuxt module for it and when I try to include below nuxt.ts
file I get error: src/nuxt.ts(4,1): error TS2742: The inferred type of 'default' cannot be named without a reference to '.pnpm/@[email protected][email protected]/node_modules/@nuxt/schema'. This is likely not portable. A type annotation is necessary.
// nuxt.ts
import { defineNuxtModule } from "@nuxt/kit";
import { fileURLToPath } from "node:url";
export default defineNuxtModule({
hooks: {
"components:dirs"(dirs) {
// Add ./components dir to the list
dirs.push({
path: fileURLToPath(new URL("./components/", import.meta.url)),
});
},
},
});
my tsup config:
import { defineConfig } from "tsup";
export default defineConfig({
dts: true,
format: ["cjs", "esm"],
entry: ["src/index.ts", "src/nuxt.ts"],
// splitting: false,
// sourcemap: true,
clean: true,
});
How can I resolve this π€
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too