egoist / egoist/tsup

how to keep original directory structure?

Open
#728 22 comments 12 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11.3k
Forks
275
PR merge metrics
No merged PRs in 30d

Description

```sh
src
- tool1
- tool1.ts
- tool2
- tool2.ts
- tool3
- tool3.ts
- index.ts
```
Such as above, `src/index.ts` is `exports` all, then use `tsup src/index.ts --format esm,cjs,iife` build,it will output:

```sh
dist
- index.mjs
- index.global.js
- index.js
```
it not I want.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `tsup src/index.ts --format esm,cjs,iife` with the `src/index.ts` entry point and the `src/tool1`, `src/tool2`, and `src/tool3` directories. Read the build configuration and existing output-path handling; done means the build preserves the requested original directory structure instead of producing only the three root-level files shown.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.