antonmedv / jsize

Find out minified and gzipped npm package size
MIT License
178 stars 12 forks source link

Fix production env replacement #5

Closed gaearon closed 7 years ago

gaearon commented 7 years ago

The tool was incorrectly putting production rather than "production" into the bundle. This code would break (since production would be an undefined variable), and did not measure the sizes correctly.

Example with react-dom (before and after the change):

screen shot 2017-07-27 at 7 49 35 pm

See also our instructions on the React website: https://facebook.github.io/react/docs/optimizing-performance.html#webpack

Hope this helps!