Skip to content

feat: load minimizers by module path in workers - #732

Open
xiaoxiaojx wants to merge 1 commit into
mainfrom
feat/worker-implementation-path
Open

feat: load minimizers by module path in workers#732
xiaoxiaojx wants to merge 1 commit into
mainfrom
feat/worker-implementation-path

Conversation

@xiaoxiaojx

Copy link
Copy Markdown
Member

Summary

  • Allow minimizer.implementation as a module path string or { path, export } (sass-loader style). Default terser uses { path, export: "terserMinify" }.
  • When every implementation in a task (including embedded) is a path, workers require via minify instead of serialize-javascript + new Function (transform). Inline minify functions keep the legacy path.
  • Split helpers into implementation.js so the worker entry only exports minify / transform; unify loading through getMinimizerSlots / embeddedFromSlots.

Test plan

  • yarn test (full suite)
  • Confirm default parallel builds call worker.minify (not transform)
  • Confirm minify: () => … / mixed path+function configs fall back to transform
  • Smoke a yarn-linked webpack build / minimizer-handoff-unit bench against rebuilt dist

Made with Cursor

@changeset-bot

changeset-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e50aeee

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.44%. Comparing base (649b48d) to head (e50aeee).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Sep 9, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: xiaoxiaojx / name: xiaoxiaojx (e50aeee)

@xiaoxiaojx
xiaoxiaojx force-pushed the feat/worker-implementation-path branch from 6ad15aa to e50aeee Compare September 9, 2026 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant