devIndicators
当你编辑代码并且 Next.js 正在编译应用时,页面右下角会出现一个编译指示器。
¥When you edit your code, and Next.js is compiling the application, a compilation indicator appears in the bottom right corner of the page.
很高兴知道:该指示器仅在开发模式下出现,在生产模式下构建和运行应用时不会出现。
¥Good to know: This indicator is only present in development mode and will not appear when building and running the app in production mode.
在某些情况下,该指示器可能会错误地放置在你的页面上,例如,当与聊天启动器发生冲突时。要更改其位置,请打开 next.config.js
并将 devIndicators
对象中的 buildActivityPosition
设置为 bottom-right
(默认)、bottom-left
、top-right
或 top-left
:
¥In some cases this indicator can be misplaced on your page, for example, when conflicting with a chat launcher. To change its position, open next.config.js
and set the buildActivityPosition
in the devIndicators
object to bottom-right
(default), bottom-left
, top-right
or top-left
:
module.exports = {
devIndicators: {
buildActivityPosition: 'bottom-right',
},
}
在某些情况下,该指标可能对你没有用。要删除它,请打开 next.config.js
并禁用 devIndicators
对象中的 buildActivity
配置:
¥In some cases this indicator might not be useful for you. To remove it, open next.config.js
and disable the buildActivity
config in devIndicators
object:
module.exports = {
devIndicators: {
buildActivity: false,
},
}
还有一个指示器显示页面是否会在开发过程中进行预渲染。它可以通过单击隐藏每个页面,但如果你不想显示它,可以禁用它:
¥There is also an indicator to show whether a page will be prerendered during a build in dev. It can be hidden per-page by clicking although if you never want it to show it can be disabled:
module.exports = {
devIndicators: {
appIsrStatus: false,
},
}