precompress - please add configuration
Open
Nobody has claimed this yet.
pkg:adapter-node
pkg:adapter-static
- Dominant language
- JavaScript
- Stars
- 20.8k
- Forks
- 2.3k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 156
Description
Describe the problem
Hello,
Precompress could use some configuration settngs for the adapters that support it.
Thank you!
Describe the proposed solution
- Allow to disable gzip or brotli. Something like {gzip: false, brotli: true}
- Add a minimum size of the assets that should be compressed. For example, do not compress anything under 1024 bytes. Compressing these tiny files can actually make them larger. Something like {minSize: 1024}
- Allow to control which assets are compressed. Something like {formats: [html, svg, js, css]}
Alternatives considered
No response
Importance
nice to have
Additional Information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the precompress implementation and the adapters that support it, then trace how their configuration is defined and passed through. Review the requested gzip/brotli toggles, minimum asset size, and format selection; the work is done when these settings consistently control compression for supported adapters and are covered by the relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100