compressed-size-action
compressed-size-action copied to clipboard
Comments are not stripped from compressed files
JavaScript comments are not removed from the built files and contribute to reported file size. I think comments should be stripped to provide realistic data that reflects what a production build would do.
I opened an issue against the size-plugin-core module as it looks like that is where the feature is missing - https://github.com/kuldeepkeshwar/size-plugin-core/issues/8
This would likely have to be an option that is disabled by default, since it requires parsing the JS. That'll be slow, right now file files aren't even loaded into memory.
FWIW I use a fork of this action with a fork of the size plugin - https://github.com/necolas/compressed-size-plugin/commit/082eb2c4cb56548aedfa6e967aa52507e569ccad