rollup / rollup-starter-lib

Bare-bones example of how to create a library using Rollup
MIT License
961 stars 230 forks source link

tslib usage seems off #73

Open justin-calleja opened 3 years ago

justin-calleja commented 3 years ago

First time coming across tslib in this project (thanks). From its README:

This is a runtime library for TypeScript that contains all of the TypeScript helper functions.

For optimized bundles with TypeScript, you should absolutely consider using tslib and --importHelpers.

So it seems like the existing package.json for this project should be updated to put tslib under dependencies (not devDependencies), and that tsconfig.json should have importHelpers uncommented to set it to true.

Would probably add some docs in README.md to the effect that e.g. if your lib is small (e.g. you only have one module), then you're better off just removing tslib and the importHelpers option.

What do you think? Do you want a PR for this?

Cheers