Skip to content

Add CompressionPlugin #234

Closed
Closed

Description

@antonmoiseev

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:

  1. Saves computation resources on the server
  2. 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.
  3. Allows to calculate the real application payload size after the build and report/draw charts on CI.

Activity

  1. PatrickJS commented on Jan 19, 2016

    @PatrickJS
    Owner

    good idea! can you make a pull-request for the prod webpack.config?

  2. antonmoiseev commented on Jan 19, 2016

    @antonmoiseev
    ContributorAuthor

    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?

  3. crh225 commented on Apr 28, 2017

    @crh225

    @antonmoiseev does angular need any configuration to serve the gzipped files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions