Gathering detailed insights and metrics for vue-cli-plugin-compression
Gathering detailed insights and metrics for vue-cli-plugin-compression
Gathering detailed insights and metrics for vue-cli-plugin-compression
Gathering detailed insights and metrics for vue-cli-plugin-compression
Prepare compressed versions of assets to serve them with Content-Encoding
npm install vue-cli-plugin-compression
Typescript
Module System
Node Version
NPM Version
58.9
Supply Chain
60.5
Quality
74.5
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
17 Stars
48 Commits
2 Forks
2 Watchers
2 Branches
2 Contributors
Updated on Apr 19, 2025
Minified
Minified + Gzipped
Latest Version
2.0.0
Package Id
vue-cli-plugin-compression@2.0.0
Unpacked Size
3.63 kB
Size
1.42 kB
File Count
3
NPM Version
6.14.16
Node Version
12.22.12
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
compression plugin for vue-cli
Uses compression-webpack-plugin
By default, a brotli and gzip compression plugin are configured, which automatically compress js, css, html, svg and json files.
1vue add compression
vue-cli-plugin-compression
default configuration in vue.config.js
:
1const zlib = require("zlib"); 2module.exports = { 3 pluginOptions: { 4 compression:{ 5 brotli: { 6 filename: '[file].br[query]', 7 algorithm: 'brotliCompress', 8 include: /\.(js|css|html|svg|json)(\?.*)?$/i, 9 compressionOptions: { 10 params: { 11 [zlib.constants.BROTLI_PARAM_QUALITY]: 11, 12 }, 13 }, 14 minRatio: 0.8, 15 }, 16 gzip: { 17 filename: '[file].gz[query]', 18 algorithm: 'gzip', 19 include: /\.(js|css|html|svg|json)(\?.*)?$/i, 20 minRatio: 0.8, 21 } 22 } 23 } 24}
It is possible to extend with own compression options, e.g.
1const zopfli = require('@gfx/zopfli'); 2module.exports = { 3 pluginOptions: { 4 compression:{ 5 zopfli: { 6 compressionOptions: { 7 numiterations: 15, 8 }, 9 algorithm(input, compressionOptions, callback) { 10 return zopfli.gzip(input, compressionOptions, callback); 11 }, 12 } 13 } 14 } 15}
Compression Webpack plugin is enabled only in production
mode by default. However, this can be overridden by specifying the option modes
1module.exports = { 2 pluginOptions: { 3 compression:{ 4 modes: ['development', 'production'], 5 ... 6 } 7 } 8}
config.plugins('brotli-compression')
config.plugins('gzip-compression')
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/5 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
11 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More