microsoft / tslib

Runtime library for TypeScript helpers.
BSD Zero Clause License
1.25k stars 126 forks source link

tslib >=2.5.1 regression - increases bundle size caused by noop `Object.create;` statements #212

Open Hotell opened 1 year ago

Hotell commented 1 year ago

deps in our repo:

while bumping from tslib 2.4.1 to 2.5.3 our CI blocked PRs because more than 3kb Size increase in our bundled code.

I did some amount of investigation and it looks like there is increased occurrence of Object.create; statements emitted within the bundle that don't do anything . This looks like cause of __assign helper from tslib.

if we bump only to 2.5.0 the regression does not occur.

tslib-regression.zip