清理
ffprobe-static
包中无用平台和架构的二进制文件,减少 Electron 应用体积。
npm install -g ffprobe-static-prune
A lightweight CLI tool to remove unnecessary ffprobe-static
platform binaries after npm install
, so your app package is lighter and faster.
- Removes unused
ffprobe
binaries for irrelevant platforms/architectures - Ideal for reducing Electron app bundle size
- Supports CLI arguments or defaults to current environment
npm install --save-dev ffprobe-static-prune
or
npm install -g ffprobe-static-prune
Run in your project root after installing ffprobe-static:
npx ffprobe-static-prune
Or manually specify platform and architecture:
node index.js --platform=darwin --arch=arm64 --baseDir=.
Option | Description | Default |
---|---|---|
--platform |
Platform to keep (darwin , win32 , linux ) |
process.platform |
--arch |
Architecture to keep (x64 , arm64 , ia32 , etc.) |
process.arch |
--baseDir |
Base directory of your project | process.cwd() |