size-plugin icon indicating copy to clipboard operation
size-plugin copied to clipboard

Output size difference is always the same size as actual output

Open stevenfitzpatrick opened this issue 7 years ago • 4 comments
trafficstars

Hi,

Love the idea of this plugin ! Has anybody got it working ?

For me the output of the plugin is always the same the actual file size output, i.e. it never compares with previous builds

I.e. sample output

vendors~admin~create-bet~login.bundle.9aa89c670076013d8fb7.js ⏤  20.9 kB (+20.9 kB)
                                                      main.css ⏤  2.18 kB (+2.18 kB)
                           main.bundle.ca78aa7c8d6b80d6a794.js ⏤  8.28 kB (+8.28 kB)
                                                         2.css ⏤  107 B (+107 B)
                      dashboard.bundle.c2606a256910c68c213f.js ⏤  1.17 kB (+1.17 kB)
                     create-bet.bundle.3b2e0767f6308ec7e4ca.js ⏤  1.23 kB (+1.23 kB)
                                                         4.css ⏤  205 B (+205 B)
                          admin.bundle.5740df303ba85130515a.js ⏤  3.02 kB (+3.02 kB)
                          login.bundle.96773d2bb3d6c67df42a.js ⏤  1.04 kB (+1.04 kB)
                   vendors~main.bundle.73fbc0215d9b89852b15.js ⏤  149 kB (+149 kB)
                                                    index.html ⏤  541 B (+541 B)

And here is my sample webpack config :

https://github.com/stevenfitzpatrick/mybettingslips/blob/master/build-utils/webpack.prod.js

And yes I tried to change the order of the size plugin putting it first / last always same result.

stevenfitzpatrick avatar Sep 20 '18 19:09 stevenfitzpatrick

I have the same issue. I would expect plugin to create some file which is used to compare the size, but nothing like this is happening.

MartinCerny-awin avatar Nov 27 '18 16:11 MartinCerny-awin

Are you using a plugin to clear your output directory? If so, that will break this plugin.

#6 provides a way forward that would circumvent this issue.

developit avatar Dec 06 '18 15:12 developit

Yes, @developit I am using rimraf I think this issue could be closed in favour of #6

MartinCerny-awin avatar Dec 06 '18 16:12 MartinCerny-awin

Looks like this might also be related to [chunkhash], which I just added support for.

developit avatar Dec 11 '18 16:12 developit