feat: load minimizers by module path in workers - #732
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #732 +/- ##
==========================================
+ Coverage 95.27% 95.44% +0.17%
==========================================
Files 4 5 +1
Lines 1354 1406 +52
Branches 503 529 +26
==========================================
+ Hits 1290 1342 +52
Misses 56 56
Partials 8 8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
6ad15aa to
e50aeee
Compare
Summary
minimizer.implementationas a module path string or{ path, export }(sass-loader style). Default terser uses{ path, export: "terserMinify" }.embedded) is a path, workersrequireviaminifyinstead ofserialize-javascript+new Function(transform). Inline minify functions keep the legacy path.implementation.jsso the worker entry only exportsminify/transform; unify loading throughgetMinimizerSlots/embeddedFromSlots.Test plan
yarn test(full suite)worker.minify(nottransform)minify: () => …/ mixed path+function configs fall back totransformminimizer-handoff-unitbench against rebuiltdistMade with Cursor