Fabric 7 Bundle Size Regression
Environment Information
- Package version(s): 7.84.1
- Browser and OS versions: n/a Windows 10
Please provide a reproduction of the bug in a codepen:
Actual behavior:
We recently upgraded to Fabric 7 and saw a 900KB increase in our vendors~main bundle. Looking closer, it looks like there's some imports between /lib/ and /lib-commonjs/ that's causing both to end up in the Webpack dependency graph. Below is some info from webpack-bundle-analyzer:
Here is a picture of our vendors~main before. Unminified size of 1.33MB

Here is a picture of the same after the fabric 7 upgrade. Unminified size of 3.46MB

This looks like something in /lib-commonjs is referencing something in /lib or maybe a top level barrel file. I've looked through our code thoroughly and we aren't importing anything from a top level or from outside lib-commonjs/*.
Expected behavior:
/lib should not be included if we're only importing from /lib-commonjs
Priorities and help requested:
Are you willing to submit a PR to fix? No
Requested priority: High
Products/sites affected: Microsoft Planner
Upon closer inspection, it looks like one of our dependencies switched to es2015 modules. Looks like it's time to upgrade. Closing this issue