System Info
mac
Details
emitError andemitWarning are methods in Rspack, which means they can only be called via the loader context instance, e.g.:
loaderContext.emitError(err)
in webpack, the following works:
const {emitError} = loaderContext;
emitError(err);
the workaround is:
const emitError = loaderContext.emitError.bind(loaderContext);
emitError(err);
For backwards compatibility, would it make sense for these to be "function properties", meaning functions implicitly bound to the correct context?
Reproduce link
No response
Reproduce Steps
see details above