에셋 관리 방식

무엇이 바뀌었나?

기존

개발 중 CDN에 직접 업로드, URL 하드코딩

개선

Next.js import 방식 사용, CI/CD가 CDN 업로드 처리

예제

import Image from "next/image";
import squirtle from "@/assets/images/squirtle.png";

export default function Component() {
  return <Image src={squirtle} alt="Squirtle" />;
}

결과

Squirtle
/_next/static/media/squirtle.70460767.png