[Bug]: In webpack experiments.backCompat: false
breaks rsdoctor #717
Open
Description
Version
System:
OS: macOS 14.6.1
CPU: (12) arm64 Apple M3 Pro
Memory: 1.98 GB / 36.00 GB
Shell: 5.9 - /bin/zsh
Browsers:
Chrome: 132.0.6834.84
Safari: 17.6
npmPackages:
@rsdoctor/webpack-plugin: ^0.4.13 => 0.4.13
Details
Disabling experiments.backCompat option in webpack config breaks rsdoctor.
Error:
TypeError: Cannot read properties of undefined (reading '_fakeHook')
at shouldInterceptPluginHook (/Users/d.kholstinin/projects/tramvai/node_modules/@rsdoctor/core/dist/build-utils/build/utils/plugin.js:28:12)
Seems like with backCompat: false
some hooks become undefined because of this condition.
And it breaks here (hook is undefined)
Reproduce link
https://github.com/kholstinin/rsdoctor-err
Reproduce Steps
- Execute npm run build
- Find the error message in console (it's unhandled rejection)