Skip to content

Conversation

@Aleksandr-Panin
Copy link
Collaborator

new build system - tsup

package.json Outdated
"require": "./dist/index.cjs",
"import": "./dist/index.js",
"default": "./dist/index.js",
"types": "./dist/index.d.ts"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read once that exports are checked in order. default always matches so it needs to go last. Otherwise types will never be matched.

"scripts": {
"build": "npm run clean && tsc --build tsconfig.build.esm.json && tsc --build tsconfig.build.cjs.json && tsc --build tsconfig.build.umd.json",
"clean": "rm -rf dist",
"build": "tsup src/index.ts --format cjs,esm --dts --minify --clean",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With tsc not being used anymore maybe you wanna add an extra script for typechecking and add it to the pipline. Like npm run type-check which does tsc --noEmit.

Tsup does not do any typechecks, just transpiling.

@Aleksandr-Panin Aleksandr-Panin merged commit ce33d64 into BurdaForward:main May 5, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants