Open gweesin opened 3 months ago
node v18.19.1 pnpm v9.7.1
git clone git@github.com:gweesin/unbuild-issue.git cd unbuild-issue pnpm i pnpm build
run the reproduction, you can see dist/tsup/index.type.d.ts and dist/unbuild/index.type.d.ts
dist/tsup/index.type.d.ts
dist/unbuild/index.type.d.ts
interface InterfaceA { } interface InterfaceB { } type TypeC = InterfaceA | InterfaceB; export type { TypeC };
import { InterfaceA, InterfaceB } from '@/demo'; export type TypeC = InterfaceA | InterfaceB;
the build.config.ts file:
build.config.ts
import {defineBuildConfig} from 'unbuild' export default defineBuildConfig({ entries: [ { builder: 'mkdist', input: './types/', outDir: './dist/unbuild', } ], declaration: true, clean: true, rollup: { dts: { compilerOptions: { noEmitOnError: false, strict: false, alwaysStrict: false, skipLibCheck: true, skipDefaultLibCheck: true, paths: { '@/*': ['./src/*'], } } } } })
No response
While path mapping functions correctly in rollup-plugin-dts, I'm facing an issue with unbuild where it fails to resolve paths, even though the configuration matches the test case at:
https://github.com/Swatinem/rollup-plugin-dts/blob/9d11bbabc597f1226b320e316507e138900ea7d7/tests/testcases/custom-tsconfig/tsconfig.build.json#L5
Environment
node v18.19.1 pnpm v9.7.1
Reproduction
Describe the bug
run the reproduction, you can see
dist/tsup/index.type.d.ts
anddist/unbuild/index.type.d.ts
on tsup, the compilerOptions parameter is valid like this:
on unbuild, the compilerOptions parameter is invalid like this:
the
build.config.ts
file:Additional context
No response
Logs
No response