
Security News
AI Slop Is Polluting Bug Bounty Platforms with Fake Vulnerability Reports
AI-generated slop reports are making bug bounty triage harder, wasting maintainer time, and straining trust in vulnerability disclosure programs.
vite-plugin-compression2
Advanced tools
$ yarn add vite-plugin-compression2 -D
# or
$ npm install vite-plugin-compression2 -D
import { defineConfig } from 'vite'
import { compression } from 'vite-plugin-compression2'
export default defineConfig({
plugins: [
// ...your plugin
compression()
// If you want to create a tarball archive you can import tarball plugin from this package and use
// after compression.
]
})
params | type | default | description |
---|---|---|---|
include | string | RegExp | Array<string | RegExp> | /\.(html|xml|css|json|js|mjs|svg|yaml|yml|toml)$/ | Include all assets matching any of these conditions. |
exclude | string | RegExp | Array<string | RegExp> | - | Exclude all assets matching any of these conditions. |
threshold | number | 0 | Only assets bigger than this size are processed (in bytes) |
algorithm | string| function | gzip | The compression algorithm |
compressionOptions | Record<string,any> | {} | Compression options for algorithm (details see zlib module ) |
deleteOriginalAssets | boolean | false | Whether to delete the original assets or not |
skipIfLargerOrEqual | boolean | true | Whether to skip the compression if the result is larger than or equal to the original file |
filename | string | [path][base].gz | The target asset filename |
If you want to analysis your bundle assets. Maybe you can try vite-bundle-analyzer
tarball
option dest
means to generate a tarball somewhere
tarball
is based on the ustar
. It should be compatible with all popular tar distributions out there (gnutar, bsdtar etc)
1.3.3
FAQs
a fast vite compression plugin
The npm package vite-plugin-compression2 receives a total of 73,030 weekly downloads. As such, vite-plugin-compression2 popularity was classified as popular.
We found that vite-plugin-compression2 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AI-generated slop reports are making bug bounty triage harder, wasting maintainer time, and straining trust in vulnerability disclosure programs.
Research
Security News
The Socket Research team investigates a malicious Python package disguised as a Discord error logger that executes remote commands and exfiltrates data via a covert C2 channel.
Research
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.