-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Open
Description
Discussed in #5897
Originally posted by skulter January 31, 2025
Hello,
I am encountering an issue when compiling my UI component package using Rollup in a Turborepo monorepo setup.
I am using Next.js 15 and compiling the UI package located in packages/ui with Rollup. The basic compilation works fine, but when using rollup-plugin-dts, I get an error related to @tanstack/react-table, stating that the type definitions cannot be found.
Below is the relevant part of my rollup.config.js:
{
input: 'src/index.ts',
output: {
file: 'dist/index.d.ts',
format: 'esm',
},
plugins: [
dts({
respectExternal: true,
compilerOptions: {
preserveSymlinks: true,
},
}),
external(),
],
external: ['react', 'react-dom'],
}
Here is my tsconfig.json:
"compilerOptions": {
"target": "ES6",
"module": "ESNext",
"moduleResolution": "Bundler",
"outDir": "./dist",
"rootDir": ".",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"baseUrl": ".",
"noEmit": true,
"declaration": true,
"importHelpers": true,
"isolatedModules": true,
"allowJs": true,
"allowSyntheticDefaultImports": true,
"declarationDir": "./dist",
"noFallthroughCasesInSwitch": true,
"resolveJsonModule": true,
"jsx": "react-jsx",
"noImplicitAny": false,
"paths": {
"@ui/*": ["@mono/acme-components/*"],
"@/*": ["./*"],
"@tanstack/react-table": ["./node_modules/@tanstack/react-table"]
}
}
I am using @tanstack/react-table@8.19.3.
The error suggests that Rollup dts cannot resolve the types from @tanstack/react-table. Is there a way to properly configure Rollup to resolve these types correctly?
Any guidance would be greatly appreciated.
Thank you!
juliaam
Metadata
Metadata
Assignees
Labels
No labels