Description
Credit to @43081j for the suggestion. It seems that many packages these days are choosing not to ship sourcemaps. Even though they don't get shipped to the web regardless and don't affect end users, they do increase on-disk size and bandwidth usage for the majority of developers who will never need to debug the polyfill. Especially if multiple versions of the polyfill are used across multiple projects, or if a project's CI doesn't cache downloads.
The only thing that refers to the TypeScript files in lib/
is the sourcemaps, so if we didn't ship sourcemaps we could also drop lib/
from the package.
The workaround if a developer does need sourcemaps is to clone the repo locally, then use npm link
to use the local repo as a dependency, and edit the local rollup.config.js
to enable sourcemaps. (Or we could do something like disabling sourcemaps if NODE_ENV
is production
)