Closed
Description
例如 overlay 这个属性
中文文档里是 devServer.overlay
官方文档里是 devServer.client.overlay
中文文档
devServer.overlay
boolean` `object
Shows a full-screen overlay in the browser when there are compiler errors or warnings. Disabled by default. If you want to show only compiler errors:
overlay: true
If you want to show warnings as well as errors:
overlay: { warnings: true, errors: true }
官方文档
overlay
boolean = true` `object: { errors boolean = true, warnings boolean = true }
Shows a full-screen overlay in the browser when there are compiler errors or warnings.
webpack.config.js
module.exports = { //... devServer: { client: { overlay: true, }, }, };Usage via the CLI:
npx webpack serve --client-overlayTo disable:
npx webpack serve --no-client-overlayIf you want to show only errors:
webpack.config.js
module.exports = { //... devServer: { client: { overlay: { errors: true, warnings: false, }, }, }, };Usage via the CLI:
npx webpack serve --client-overlay-errors --no-client-overlay-warnings
还有 inline 属性在 v4就已经删除却依然存在。
此外还有很多都和官方文档不同
Metadata
Metadata
Assignees
Labels
No labels