Skip to content

Conversation

@martinjlowm
Copy link

Summary

When Webpack plugins try to access hooks that don't exist in rspack, provide a clear error message instead of a cryptic message, e.g. "Cannot read properties of undefined (reading 'tap')" (attempting to use pino-webpack-plugin with rspack).

The error message explains:

  • Which hook is not supported
  • That this typically happens with webpack plugins
  • Lists all available hooks for reference

This helps developers quickly identify webpack compatibility issues.

While I haven't tested it, this should hopefully catch #12617 as well way before the panic.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@martinjlowm martinjlowm requested a review from hardfist as a code owner January 19, 2026 10:43
@netlify
Copy link

netlify bot commented Jan 19, 2026

Deploy Preview for rspack canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit eba2b3c
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/696e0acb70e34d00082c5af1

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 19, 2026

CodSpeed Performance Report

Merging this PR will improve performance by 12.54%

Comparing martinjlowm:claude/fix-rspack-plugin-error-fPBUp (c75e1ce) with main (dd3e16c)

Summary

⚡ 1 improved benchmark
✅ 15 untouched benchmarks
⏩ 1 skipped benchmark1

Performance Changes

Benchmark BASE HEAD Efficiency
bundle@threejs-development 822.4 ms 730.7 ms +12.54%

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports.

@chenjiahan chenjiahan requested a review from ahabhgk January 19, 2026 13:10
Copy link
Contributor

@ahabhgk ahabhgk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, need a test case to avoid regression

claude and others added 2 commits January 24, 2026 12:17
When webpack plugins try to access hooks that don't exist in rspack,
provide a clear error message instead of the cryptic "Cannot read
properties of undefined (reading 'tap')".

The error message explains:
- Which hook is not supported
- That this typically happens with webpack plugins
- Lists all available hooks for reference

This helps developers quickly identify webpack compatibility issues.
@martinjlowm martinjlowm force-pushed the claude/fix-rspack-plugin-error-fPBUp branch from fc16388 to c75e1ce Compare January 24, 2026 11:18
@martinjlowm martinjlowm requested a review from ahabhgk January 24, 2026 11:19
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.

4 participants