nitrojs / nitrojs/nitro

`compressPublicAssets` keeps uncompressed files

Open
#2,702 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement v2
Dominant language
TypeScript
Stars
11.2k
Forks
899
Avg merge
2d 24m
Merged PRs (30d)
40

Description

Describe the feature

I'm not sure if this is intentional, but it causes issues on some servers without strict order definitions for compressed and uncompressed files.

Currently, when enabling compressPublicAssets, the originals are kept instead of deleted.

For reference, vite-compression has an option to delete the originals:
https://github.com/vbenjs/vite-plugin-compression?tab=readme-ov-file#options

Is there a way to delete the originals when compressPublicAssets is on?

Additional information
  • Would you be willing to help implement this feature?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the compressPublicAssets entry point and the code that creates compressed public assets. Compare its behavior with the delete-originals option described in the linked vite-compression reference. Done means enabling compressPublicAssets can remove the uncompressed originals, with coverage for the resulting asset set.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.