You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What do you think about adding CompressionPlugin? I usually statically compress the build assets during the build rather than dynamically on a Web server, it has a couple of advantages:
Saves computation resources on the server
Simplifies a bit the Web server configuration - no need to configure threshold, ratio, buffers (nginx-specific varies on the platform), the file types that should be compressed.
Allows to calculate the real application payload size after the build and report/draw charts on CI.
Sure, will do. The plugin doesn't allow configuring the compression level, the default one I believe is 6. To enable level 9 it requires a tiny wrapper function around zlib which slightly complicates the build script. Which level you would prefer?
Activity
PatrickJS commentedon Jan 19, 2016
good idea! can you make a pull-request for the prod webpack.config?
antonmoiseev commentedon Jan 19, 2016
Sure, will do. The plugin doesn't allow configuring the compression level, the default one I believe is 6. To enable level 9 it requires a tiny wrapper function around zlib which slightly complicates the build script. Which level you would prefer?
crh225 commentedon Apr 28, 2017
@antonmoiseev does angular need any configuration to serve the gzipped files?