Bundle size increased after upgrading from 4.0.1 to 4.6.0 – due to comments in built files

Do you want to request a feature or report a bug?
Report a bug

What is the current behavior?

The bundle size was 400 KiB after upgrade of webpack from 4.0.1 to 4.6.0 the size increased to 739 KiB

If the current behavior is a bug, please provide the steps to reproduce.

I can’t provide access to the repository as its private. But can show my webpack config…
webpack production config
https://gist.github.com/asolopovas/b499a052eff4581704fff4bc52b1d4c5
second part of config with loader rules
https://gist.github.com/asolopovas/b0933ae085f954e9d05e4371d58a3d98

The funny thing is that If I roll back straight away to 4.0.1 the bundle size remains the same at 739KiB I have restored my lockfile and only then the bundle size get back to its original 400 KiB size. But the upgrade of webpack immediately triggers the increase in size.

What is the expected behavior?
To have similar bundle size to previous veriosn

Operating System: Windows 10 x64, Node: v9.11.1

Author: Fantashit

1 thought on “Bundle size increased after upgrading from 4.0.1 to 4.6.0 – due to comments in built files

  1. @evilebottnawi I’m glad to do it tomorrow with a reproduction repo.
    though I found extracting legal infos by extracting legal comments using uglifyjs might not be that useful in practice since a lot of library doesn’t provide the correct legal comment, like ant-design

Comments are closed.