π Hi and thank you so much for your work β€οΈ π€πΌ
tsup
is not resolving typescript absolute imports. I have a tsconfig.json
that defines multiple absolute imports (see below). tsup
bundles it without resolving for those absolute imports, so it causes errors when consuming the lib in other projects.
In your docs, I can see NormalizedOptions - which uses tsconfigResolvePaths
- but when I try to put it in my config (see below) typescript gets angry π :
'tsconfigResolvePaths' does not exist in type 'Options | Options[] | ((overrideOptions: Options) => MaybePromise<Options | Options[]>)'
tsconfig.json:
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@services/*": [
"./services/*"
],
"@vendors/*": [
"./vendors/*"
],
// ....
},
tsup.config.json:
import { defineConfig } from 'tsup';
export default defineConfig({
entry: {
index: 'index.ts',
'services/marketing/index': 'services/marketing/index.ts',
'vendors/index': 'vendors/index.ts',
},
tsconfig: './tsconfig.json',
splitting: false,
sourcemap: true,
clean: true,
});
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