Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: support cts and mts entry and generate dts file as is #261

Closed
1 task done
xiaoxiangmoe opened this issue May 6, 2023 · 1 comment
Closed
1 task done

Comments

@xiaoxiangmoe
Copy link
Contributor

Describe the feature

repo: https://github.com/xiaoxiangmoe/issue-unbuild-mts-cts

in this repo, when we run yarn tsc-build, we will

  • compile index.cts to tsc-cjs-dist/index.d.cts and tsc-cjs-dist/index.cjs
  • compile index.mts to tsc-mjs-dist/index.d.mts and tsc-mjs-dist/index.mjs
.
├── package.json
├── src
│   ├── index.cts
│   ├── index.mts
│   └── plugin.ts
├── tsc-cjs-dist
│   ├── index.cjs
│   ├── index.d.cts
│   ├── plugin.d.ts
│   └── plugin.js
├── tsc-mjs-dist
│   ├── index.d.mts
│   ├── index.mjs
│   ├── plugin.d.ts
│   └── plugin.js
├── tsconfig.cjs.json
├── tsconfig.json
└── tsconfig.mjs.json

Can we change tsc to unbuild and bundle dist? The file structure I like is as follow.

.
├── build.config.ts
├── dist
│   ├── index.cjs
│   ├── index.d.cts
│   ├── index.d.mts
│   └── index.mjs
├── package.json
├── src
│   ├── index.cts
│   ├── index.mts
│   └── plugin.ts
├── tsconfig.cjs.json
├── tsconfig.json
└── tsconfig.mjs.json

Additional information

  • Would you be willing to help implement this feature?
@xiaoxiangmoe xiaoxiangmoe changed the title Feature request: support cts and mts entry Feature request: support cts and mts entry and generate dts file as is May 6, 2023
@pi0
Copy link
Member

pi0 commented Jul 18, 2023

#273 (also unjs/mkdist#162)

@pi0 pi0 closed this as completed Jul 18, 2023
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

No branches or pull requests

2 participants