Skip to content

Commit

Permalink
Update filename pattern for webpack compression
Browse files Browse the repository at this point in the history
[query] doesn't seem supported anymore, so the old pattern results in
conflicts.

Instead, use the new default as of version 6.0.0 [1].

There does not seem to be much difference before and after.

Before:

    % ls -1 dist/*.gz
    dist/auspice.chunk.10.bundle.d1b970c44c097371463a.js.gz
    dist/auspice.chunk.11.bundle.4cf3b3dd15aa7a09092f.js.gz
    dist/auspice.chunk.12.bundle.da3915eb1ec5b7f7baf6.js.gz
    dist/auspice.chunk.13.bundle.14ea55af0226183166a3.js.gz
    dist/auspice.chunk.14.bundle.51f5527e311a0f7b3a45.js.gz
    dist/auspice.chunk.5.bundle.b787d5de82c9c358c2a6.js.gz
    dist/auspice.chunk.6.bundle.9722cd47f29a99c6066d.js.gz
    dist/auspice.chunk.7.bundle.45ad44ab7ffac762b96a.js.gz
    dist/auspice.chunk.8.bundle.47618370af0c7ccf7aa2.js.gz
    dist/auspice.chunk.9.bundle.c137a464a56a7cb7a0d6.js.gz
    dist/auspice.chunk.core-vendors.bundle.4a4f098369a236238712.js.gz
    dist/auspice.chunk.locales.bundle.08f995e834c88cc169be.js.gz
    dist/auspice.chunk.other-vendors.bundle.f8cbe24a13aa68bd092a.js.gz

After:

    % ls -1 dist/*.gz
    dist/auspice.bundle.a643293e8d8d26eb8631.js.gz
    dist/auspice.chunk.106.bundle.db610e43983c64187457.js.gz
    dist/auspice.chunk.145.bundle.4e68f1faa6878e1ced83.js.gz
    dist/auspice.chunk.236.bundle.6dca00f82e0b99aa01df.js.gz
    dist/auspice.chunk.383.bundle.79ae23992e50e870b00b.js.gz
    dist/auspice.chunk.550.bundle.7a8bceea70ffde7edbf6.js.gz
    dist/auspice.chunk.601.bundle.9a996464f910afbe8d17.js.gz
    dist/auspice.chunk.718.bundle.8a109e6ba40b88251b95.js.gz
    dist/auspice.chunk.815.bundle.2020e527c8ed3ebe83c5.js.gz
    dist/auspice.chunk.971.bundle.ba6b88e671458f7e5f43.js.gz
    dist/auspice.chunk.978.bundle.578c6bc94a1db886b23a.js.gz
    dist/auspice.chunk.locales.bundle.49f1377f1c9b33ffa9c3.js.gz
    dist/auspice.chunk.other-vendors.bundle.c38604b639c95e112558.js.gz

[1]: https://github.com/webpack-contrib/compression-webpack-plugin/blob/c270b4bcc8a3afc16e72ec3422d502d1121708ed/CHANGELOG.md#600-2020-09-14
  • Loading branch information
victorlin committed Sep 8, 2022
1 parent 89ff971 commit 2a30e49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const generateConfig = ({extensionPath, devMode=false, customOutputPath, analyze
});
/* gzip everything - https://github.com/webpack-contrib/compression-webpack-plugin */
const pluginCompress = new CompressionPlugin({
filename: "[path].gz[query]",
filename: "[path][base].gz",
algorithm: "gzip",
test: /\.(js|css|html)$/,
threshold: 4096
Expand Down

0 comments on commit 2a30e49

Please sign in to comment.