在 NextJS DEV 环境中去除 static indicator

힘센캥거루
2025년 1월 2일
43
nextjs

我正在创建一个聊天窗口进行开发,但是那个标记为 Static route 的闪电图标让我感到非常烦扰。

我寻找了怎么去掉它,但都没有成功。

在 NextJS DEV 环境中去除 static indicator-1

最后还是去看了官方文档……

终于找到了。[链接]

果然不负所望!

在 NextJS DEV 环境中去除 static indicator-2

import type { NextConfig } from 'next'
 
const nextConfig: NextConfig = {
  devIndicators: {
    appIsrStatus: false,
  },
}
 
export default nextConfig

应用这个配置后,按钮就消失了。

真是舒畅。

在 NextJS DEV 环境中去除 static indicator-3

댓글을 불러오는 중...