Selectively suppress webpack runtime errors?
Author: francisashleyCreated Oct 3, 2023Updated Dec 31, 2024
Labelsbug
We can disable all runtimeErrors from appearing in the error overlay with https://webpack.js.org/configuration/dev-server/#overlay:
module.exports = () => {
return {
devServer: {
client: {
overlay: {
runtimeErrors: false
}
}
}
};
};However attempting to provide the handler function
module.exports = () => {
return {
devServer: {
client: {
overlay: {
runtimeErrors: (error) => {
return true;
}
}
}
}
}
};
};throws the error Invalid options object. Dev Server has been initialized using an options object that does not match the API schema..
Is this easy to resolve? Thanks
CRACO version
7.1.0
Source: dilanx/craco