While migrating from Webpack 4 to Webpack 5 I got an error when using devtool with empty value (only in production mode).
devtool
module.exports = {
Answer to own question! Spoiler: false.
false
module.exports = { devtool: isProd ? false : 'source-map', }
In Webpack 4 it was possible to value this with an empty string. webpack 5 is more strict. Webpacks devtool configuration.