Undesirable 92KB Bundle Size Increase at v1.11.0
See original GitHub issueI’m experiencing a bundle size increase of 92KB after upgrading from v1.10.0 to v1.11.0.
I suspect this is due to the addition of Babel-Polyfill, which adds all of core-js and regenerator-runtime to the bundle.
Before upgrading my main.js bundle was 213KB, and after upgrading it is 305KB, an increase of 43%.
I am of the opinion that opting into polyfills for IE support should be done at the app level, rather than the library level. In my own case, I have next-auth as a dependency, and would rather not include the babel-polyfill code in my code’s bundle, and also would rather not take on babel-polyfill
, core-js
, and regenerator-runtime
as transitive dependencies. My app has no intention of supporting IE, and I’m trying to keep the bundle as small as possible, so I personally would rather not include these polyfills. I’m sure others would also take issue with the inclusion of these polyfills.
The change made in v1.11.0 makes it impossible to opt out of including these polyfills.
Would you kindly consider removing babel-polyfill
as a dependency of this library, and instead encourage your users who need IE support to add it to their app’s codebase instead? Thank you very much.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Importing
next-auth/client
results in afor us. I assume it’s because we handle polyfilling ourselves in our custom webpack config already. Any advice on how I can proceed?
v2 is out now and v1 isn’t supported anymore.