egoist / tsup

The simplest and fastest way to bundle your TypeScript libraries.
https://tsup.egoist.dev
MIT License
8.99k stars 217 forks source link

Should `rollup-plugin-dts` be a dependency? #681

Closed IanVS closed 2 years ago

IanVS commented 2 years ago

It's being required in rollup.ts https://github.com/egoist/tsup/blob/34df1da747a2153b39586a1362c601717f133724/src/rollup.ts#L31, and the generated dist file is pretty wonky:

var require_rollup_plugin_dts = _chunkWXLEX5S3js.__commonJS.call(void 0, {
  "node_modules/.pnpm/rollup-plugin-dts@4.2.1_rymbksdyfyl5jij5b5y6cpv63i/node_modules/rollup-plugin-dts/dist/rollup-plugin-dts.cjs"(exports) {

I think that means that it's being bundled from what pnpm had installed on your machine when you ran the bundling, maybe? Is that intentional? Or, maybe it should be listed as a normal dependency?

egoist commented 2 years ago

yeah it's bundled intentionally, mainly to get rid of "missing peer dependency typescript" warning, this also makes the package size a little smaller.