93 Commits

Author SHA1 Message Date
ArcherGu
8d7ce9e03f
feat: allow to exclude dependencies from specific package.json (#717) 2022-10-06 22:46:05 +08:00
EGOIST
c06b5e1426 fix: make --treeshake work with hashbang 2022-08-12 13:48:19 +08:00
EGOIST
c3dc8d8cc5 fix(deps): upgrade esbuild to 0.15, resolves #690 2022-08-12 13:17:33 +08:00
nikaple
34df1da747
feat: improve minification for --target es5 (#664)
* feat: improve minification for `--target es5`

* remove .only

Co-authored-by: EGOIST <0x142857@gmail.com>
2022-07-25 22:57:57 +08:00
Joel M
20879071a9
feat: allow onSuccess callback in tsup config file (#657)
Co-authored-by: EGOIST <0x142857@gmail.com>
2022-07-25 22:34:44 +08:00
EGOIST
8dbb97dd7b test: fix decorator test 2022-07-25 20:42:51 +08:00
EGOIST
fcdcd8bcce test: ability to remove unused code 2022-07-25 20:26:31 +08:00
EGOIST
8230221e4e fix: make --minify work with es5 target, fix #653 2022-06-10 23:46:49 +08:00
Julien Goux
58d0145e84
feat(cli): add --tsconfig flag to accept custom tsconfig path (#652)
* feat: expose tsconfig option

* write a test

* oops, remove the only function

* no need for a snapshot

Co-authored-by: EGOIST <hi@egoist.sh>
2022-06-10 23:08:43 +08:00
Julien Goux
be48b8b7a5
feat(minor): use shell option for complex commands in onSuccess (#649) 2022-06-10 22:45:13 +08:00
EGOIST
33a7c5f94e feat: allow to use an object as entry with --entry flag 2022-06-06 01:30:54 +08:00
EGOIST
90f2d1ae3a feat: support custom config file with --config flag 2022-06-06 01:17:03 +08:00
EGOIST
b9cd8d5f09 feat: new option outExtension 2022-05-30 21:29:37 +08:00
EGOIST
1602446900 feat: shims option is now false by default
BREAKING CHANGE:

`shims` option is `false` by default, changing it `true` allows tsup to shim `import.meta.url` in `cjs` build and `__dirname` `__filename` in `esm` build
2022-05-25 16:38:22 +08:00
EGOIST
b4fd91aa4c feat: allow to use rollup for tree shaking
a new flag `--treeshake` as well as a config option `treeshake`
2022-05-25 16:24:05 +08:00
schelmo
67eea53583
fix: resolve to package.json only if tsup key exists (#622)
Co-authored-by: EGOIST <hi@egoist.sh>
2022-05-05 21:51:36 +08:00
EGOIST
637ec281ab fix: make sure sources are relative path in sourcemap, closes #603 2022-04-03 17:20:18 +00:00
EGOIST
e5fe1c188b fix: don't treat .node.js as native node module, closes #589 2022-04-02 14:16:59 +00:00
EGOIST
93bf6e808a chore(deps): update vitest 2022-04-01 12:42:40 +08:00
Zhang Zhi
f08cde4439
chore: supports cross-module inlining of TypeScript enum constants (#587) 2022-03-17 12:30:31 +08:00
EGOIST
20fb72b308 fix: ignore non js/ts files in --dts build, closes #554 2022-01-30 17:21:33 +08:00
EGOIST
e6009846d0 test: replace ava with vitest 2022-01-30 17:05:44 +08:00
EGOIST
b8c51f4553 fix: node 12.20.0 compatibility 2022-01-29 18:06:20 +08:00
Giuem
2a42a02fc7
fix: support multiple targets (#525) 2021-12-31 20:34:24 +08:00
EGOIST
0826b35bb2 fix: bring back inline sourcemap support, closes #495 2021-12-15 14:04:50 +08:00
Tmk
39a8d13d42
fix: inject style in multi formats (#490) 2021-12-11 00:54:03 +08:00
EGOIST
524470c49b
feat: experimental plugin system (#486)
Co-authored-by: EGOIST <0x142857@gmail.com>
Co-authored-by: 木杉 <zhmushan@qq.com>
2021-12-10 15:44:27 +08:00
木杉
798f446f77 feat: Simple CSS injection support (#483)
Co-authored-by: EGOIST <0x142857@gmail.com>
2021-12-10 12:26:19 +08:00
EGOIST
a6e06e8963 fix: now cjs shims should only be injected when it's actually used 2021-12-08 00:38:36 +08:00
木杉
10565759ed
fix: Preserve usused imports when esbuild transforms ts in svelte (#476) 2021-11-30 19:54:10 +08:00
EGOIST
d0870dd3bd fix: shim __dirname, __filename in esm bundle 2021-11-29 20:01:11 +08:00
EGOIST
ab5829d44c fix(svelte): handle lang="ts" 2021-11-26 19:13:11 +08:00
EGOIST
da9011f924 chore: remove unnecessary snapshot 2021-11-26 01:41:27 +08:00
EGOIST
6e126083c6 chore: migrate to pnpm and ava 2021-11-26 01:26:55 +08:00
木杉
9dd1b41835
chore: run ci on windows (#470)
Co-authored-by: EGOIST <0x142857@gmail.com>
2021-11-25 23:18:42 +08:00
EGOIST
531a05eeda feat: use swc to support decorator metadata
skip-release
2021-11-25 20:47:33 +08:00
EGOIST
2d4f6b0604 feat: add --dts-only flag to emit declarations only 2021-11-23 22:52:19 +08:00
木杉
3fb9b8ed2f
fix: bundle svelte without styles (#464) 2021-11-23 12:57:43 +08:00
木杉
8c8f19f382
fix(windows): support backslash in cli arguments (#463) 2021-11-23 12:57:04 +08:00
hiroki osame
c78ea9cff5
feat(minor): support node: import in older node versions (#460) 2021-11-20 16:05:13 +08:00
EGOIST
795d065eae test: multiple entry with the same base name 2021-11-17 14:09:58 +08:00
EGOIST
1a0f69e28d feat: add --metafile flag, closes #443 2021-10-25 13:00:55 +08:00
EGOIST
a4a5404470 fix: make declaration files work with multiple entrypoints
closes #316
2021-10-22 23:29:45 +08:00
Sachin Raja
5699a010b8
fix: drop cjs_shims if they are not used (#436) 2021-10-17 20:33:07 +08:00
Pablo Sáez
792234624d
feat: update esbuild to ^0.13.4 (#431) 2021-10-07 12:15:04 +08:00
EGOIST
f268c649d2 feat: add --inject flag
related #390
2021-10-04 21:23:35 +08:00
EGOIST
1667fd2b97 feat: make experimental cjs code splitting available behine flag --splitting
closes #408
2021-09-16 21:07:24 +08:00
FM
49f48ead4c
fix: only enable code splitting in esm format (#403)
BREAKING CHANGE:

Code splitting now only works for esm format (default output format is `cjs`), code splitting with cjs format is not supported by esbuild, and our workaround is kinda buggy, so we reverted that decision.
2021-09-15 21:59:43 +08:00
Tmk
a87b3d5a5b
feat: support inline sourcemap (#386)
* feat: support inline sourcemap

* Update README.md

Co-authored-by: Tmk <tanmengkang@bytedance.com>
Co-authored-by: EGOIST <0x142857@gmail.com>
2021-08-16 16:46:57 +08:00
EGOIST
03d74e0942 chore: fix test dependencies 2021-06-03 17:57:28 +08:00