Skip to content

Breaking: Add webpack support via worker-based .yak.ts evaluation#488

Open
Jan Nicklas (jantimon) wants to merge 31 commits intomainfrom
feat/webpack-isolated-source-eval
Open

Breaking: Add webpack support via worker-based .yak.ts evaluation#488
Jan Nicklas (jantimon) wants to merge 31 commits intomainfrom
feat/webpack-isolated-source-eval

Conversation

@jantimon
Copy link
Collaborator

No description provided.

Jan Nicklas (jantimon) and others added 24 commits February 1, 2026 17:50
…on (#456)

New package that evaluates TypeScript/JavaScript modules in isolated worker
threads using Node 24's native type stripping. Replaces webpack's
this.importModule with a bundler-agnostic approach featuring:

- Primary/shadow worker pattern for instant cache invalidation
- ESM loader hooks for transitive dependency tracking
- Result caching with bi-directional dependency graph
- Serialized evaluation queue to keep dependency tracking accurate
- Windows-correct path handling via fileURLToPath
- Input validation for absolute paths

Includes CI workflow running on ubuntu and windows with Node 24.
Use join() instead of hardcoded "foo/bar" so the expected value
matches node:path output on both Unix and Windows.
Update engines field, all GitHub Actions workflows, and CLAUDE.md prerequisites.
The syntax-error.ts test fixture contains deliberately invalid syntax
which causes prettier to fail in the autofix CI workflow.
  Add 5 missing e2e cases that cover cross-file features previously only
  tested by the webpack snapshot tests in cross-file-tests/:
  - namespace-import: export * as namespace re-exports
  - cross-file-mixin: importing css mixins from other files
  - nested-mixin: multi-level mixin chains with component selectors
  - component-selector: using styled components as CSS selectors
  - yak-file-mixin: dynamic mixin generation in .yak.ts files

  Remove cross-file-tests/ directory and its references from
  pnpm-workspace.yaml and package.json scripts
# Conflicts:
#	e2e/README.md
#	e2e/package.json
#	e2e/test-env.ts
#	package.json
#	pnpm-lock.yaml
…eval

# Conflicts:
#	.github/workflows/e2e.yml
#	e2e/README.md
#	e2e/cases/media-query/queries.yak.ts
#	e2e/package.json
#	e2e/run.ts
#	pnpm-lock.yaml
@changeset-bot
Copy link

changeset-bot bot commented Feb 10, 2026

🦋 Changeset detected

Latest commit: 516097e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
next-yak Major
storybook-addon-yak Major
next-yak-example Patch
@example/storybook Patch
vite-yak-example Patch
benchmarks Patch
docs Patch
yak-swc Major

Not sure what this means? Click here to learn what changesets are.

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

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 10, 2026

Merging this PR will not alter performance

✅ 12 untouched benchmarks
⏩ 12 skipped benchmarks1


Comparing feat/webpack-isolated-source-eval (516097e) with main (70b9d16)

Open in CodSpeed

Footnotes

  1. 12 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@jantimon Jan Nicklas (jantimon) force-pushed the feat/webpack-isolated-source-eval branch from 1c3d585 to ef2fe16 Compare February 10, 2026 14:27
Support batch invalidation of multiple files in a single call,
collecting all affected entry points before clearing caches and
swapping workers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant