TypeScript Version: 3.6.1-rc
Search Terms:
tslib
Expected behavior:
#32742, which changes all tslib imports from namespace imports to named imports, would have decreased bundle size in webpack builds from typescript code
Actual behavior:
Due to a quirky workaround in webpack, all function invocations of named harmony imports are wrapped in an Object() constructor; as a result, #32742 actually increases bundle size (to the tune of ~9kB in Outlook Web boot bundles)
Since the PR was an attempt specifically to help webpack, and @sokra claims that tree-shaking works even with namespace imports, I think the change should be reverted.
Related Issues:
webpack/webpack#9615
TypeScript Version: 3.6.1-rc
Search Terms:
tslib
Expected behavior:
#32742, which changes all
tslibimports from namespace imports to named imports, would have decreased bundle size in webpack builds from typescript codeActual behavior:
Due to a quirky workaround in
webpack, all function invocations of named harmony imports are wrapped in anObject()constructor; as a result, #32742 actually increases bundle size (to the tune of ~9kB in Outlook Web boot bundles)Since the PR was an attempt specifically to help webpack, and @sokra claims that tree-shaking works even with namespace imports, I think the change should be reverted.
Related Issues:
webpack/webpack#9615