Hi there, thanks for creating such an incredible package! I've been trying to setup tsup in the TanStack Query alpha branch, and seem to have an issue generating .d.ts
files - I've just been falling back to tsc
(not ideal, especially with the 7.1.0 improvement for ESM/CJS).
In particular, I'm having issues configuring @tanstack/eslint-plugin-query.
tsup.config.js
export default defineConfig({
entry: ['src/index.ts'],
format: ['cjs', 'esm'],
target: ['es2020', 'node16'],
outDir: 'build/lib',
external: [/eslint/],
dts: true, // Add this to generate the code below
sourcemap: true,
clean: true,
})
After running pnpm run build:tsup
with dts
enabled in config:
build/lib/index.d.ts
export { configs } from './configs/index.ts';
export { rules } from './rules/index.ts';
For some reason, it is outputting relative links to .ts
files which don't exist in the build directory. I wonder if this is something to do with the entry field? Any help would be much appreciated!
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