🤤
dev環境で画像にpriorityを付けた後出る警告は気にしなくていい
LCPの警告をpriorityで無くしたら出た警告
warning
The resource http://localhost:3000/hogehoge was preloaded using link
preload but not used within a few seconds from the window's load event.
Please make sure it has an appropriate `as` value and it is preloaded intentionally.
code.tsx
<Image
src="/logo.png"
alt="logo"
className={kurasu}
fill
style={{objectFit: "contain"}}
sizes="50vw"
priority
/>
npm run build
してnpm run start
で試したら警告は消えた。
三時間も消えた。
Discussion