Search Docs
这里展示了 Rspack 支持的其余配置项。
boolean
false
遇到第一个错误时退出。Rspack 在默认情况下会在命令行以及在 HMR 时的浏览器 console 中打印这些错误,并且继续编译。
module.exports = { bail: true, };
这会强制 Rspack 终止编译流程。
(RegExp | ((warning: Error, Compilation: Compilation) => boolean))[]
undefined
告知 Rspack 忽略特定的警告。
module.exports = { //... ignoreWarnings: [/warning from compiler/, warning => true], };