When using a TypeScript checked CJS module require, TypeScript incorrectly complains with "This expression is not constructable."
During runtime this works as expected.
const ReactRefreshRspackPlugin = require('@rspack/plugin-react-refresh');
const instance = new ReactRefreshRspackPlugin();
Adding .default to the require silences the TypeScript error, but fails during runtime.
Using const { ReactRefreshRspackPlugin } = require('@rspack/plugin-react-refresh'); fails for both TypeScript and during runtime.
Note: happening since 1.4.0.