docs: deprecate in favour of minimizer-webpack-plugin - #436
Conversation
Compression ships there now, as an asset generator, and two bugs open here are fixed by it. The README says what each option maps to.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #436 +/- ##
=======================================
Coverage 93.38% 93.38%
=======================================
Files 1 1
Lines 121 121
Branches 48 47 -1
=======================================
Hits 113 113
Misses 7 7
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. WalkthroughThe package description marks the plugin as deprecated and directs users to Priority: ➖ Normal Severity of issue fixed: Medium 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation The PR changes only
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 5a90a803-3b62-49c6-b8ae-4eac904c1de9
📒 Files selected for processing (2)
README.mdpackage.json
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.
Compressing runs in the webpack process there too, since the bytes have no way across to a worker; the delete and the function forms arrive in 5.11.0.
Summary
minimizer-webpack-plugincompresses now —MinimizerPlugin.compressas anassetgenerator — so this plugin has nothing left that is its own. Reading an asset, writing one beside it, caching both and running them where they belong is the same work whether the bytes come back smaller or differently encoded, and minifying and compressing become one plugin over one pass of filtering and one cache, ordered by the stage each asks for rather than by which plugin was applied first.It also settles what is open here. Deleting an original there takes that file alone, where webpack deletes everything an asset's
relatednames, so a gzip instance no longer destroys a brotli one's output: Closes #245, Closes #389. The work runs in a worker pool: Closes #408.The README gains a deprecation warning and a
Migratingsection mapping every option to its home, including the empty list of minimizers for an instance that compresses and changes nothing.package.json's description says it too, for anyone reading the registry rather than the repo.What kind of change does this PR introduce?
docs.
Did you add tests for your changes?
n/a — documentation only, no source change.
Does this PR introduce a breaking change?
No. The plugin keeps working as it does today.
If relevant, what needs to be documented once your changes are merged or what have you already documented?
Documented here. Two things remain outside this repository:
npm deprecate compression-webpack-plugin, and webpack.js.org, where the plugin's page should point atminimizer-webpack-plugininstead.Use of AI
Claude Code was used for this change and description. The two bugs it closes were confirmed by running this implementation and the replacement over the same fixtures: gzip plus brotli with
deleteOriginalAssets: trueemits no.brfiles here today, and does emit them there.Generated by Claude Code
Summary by CodeRabbit
Documentation
minimizer-webpack-plugin.filename,deleteOriginalAssets, source maps, and related assets.Chores