
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
next-render-analyzer
Advanced tools
Next.js 프로젝트의 렌더링 전략(SSG/SSR/ISR/CSR)과 컴포넌트 타입(서버/클라이언트)을 분석하는 CLI 도구입니다.
Next.js App Router를 사용하면서 이런 고민을 해본 적 있으신가요?
Next.js 13+ App Router는 강력하지만, 프로젝트가 커지면 각 컴포넌트가 어디서 실행되는지 파악하기 어려워집니다.
컴포넌트 타입 파악의 어려움
'use client'가 있는지 확인해야 함렌더링 전략 혼란
revalidate 등 설정이 분산되어 있음npm install next-render-analyzer
git clone https://github.com/khwww/render-analyzer.git
cd render-analyzer
npm install
npm run build
npm link
# 기본 분석
next-render-analyzer ./my-next-app
# 상세 정보 출력
next-render-analyzer ./my-next-app --detailed
# 컴포넌트 트리 출력
next-render-analyzer ./my-next-app --tree
# JSON 형식 출력
next-render-analyzer ./my-next-app --json
또는 빌드 없이 개발 모드로 실행:
npm run dev -- ./my-next-app
============================================================
Next.js Render Analyzer
============================================================
[ 페이지별 렌더링 방식 ]
------------------------------------------------------------
app/page.tsx
-> SSG (Static Site Generation)
app/blog/[slug]/page.tsx
-> ISR (Incremental Static Regeneration)
-> revalidate: 60초
[ 서버 컴포넌트 ]
------------------------------------------------------------
[S] Header
파일: components/Header.tsx
async 컴포넌트
[ 클라이언트 컴포넌트 ]
------------------------------------------------------------
[C] SearchBar
파일: components/SearchBar.tsx
Hooks: useState, useEffect
[ 통계 ]
------------------------------------------------------------
총 컴포넌트: 15개
서버 컴포넌트: 10개
클라이언트 컴포넌트: 5개
| 전략 | 설명 | 감지 방법 |
|---|---|---|
| SSG | 빌드 시 정적 생성 | 기본값, dynamic = 'force-static' |
| SSR | 요청 시 서버 렌더링 | cookies(), headers(), searchParams, fetch no-store, dynamic = 'force-dynamic' |
| ISR | 주기적 재생성 | revalidate export |
| CSR | 클라이언트에서 렌더링 | 'use client' + Hooks |
| 타입 | 설명 | 감지 방법 |
|---|---|---|
| Server | 서버에서만 실행 | 기본값 (use client 없음) |
| Client | 브라우저에서 실행 | 'use client' 지시어 |
'use client' 지시어 감지export const revalidate 감지 (ISR)export const dynamic 감지 (force-dynamic, force-static)cookies() 함수 사용 감지 (SSR)headers() 함수 사용 감지 (SSR)searchParams 파라미터 사용 감지 (SSR)fetch with cache: 'no-store' 감지 (SSR)import { analyzeProject, analyzeFile, analyzePage } from "next-render-analyzer";
// 프로젝트 전체 분석
const result = analyzeProject("./my-next-app");
console.log(result.pages); // PageAnalysis[]
console.log(result.components); // FileAnalysis[]
// 단일 파일 분석
const file = analyzeFile("./components/Button.tsx");
console.log(file.componentType); // "SERVER" | "CLIENT"
// 페이지 분석
const page = analyzePage("./app/page.tsx");
console.log(page.renderStrategy); // "SSG" | "SSR" | "ISR" | "CSR"
# 의존성 설치
npm install
# 개발 모드 실행
npm run dev
# 빌드
npm run build
# 테스트
npm test
# 린트
npm run lint
MIT
FAQs
Next.js 렌더링 분석 도구 - SSG/SSR/ISR/CSR 및 서버/클라이언트 컴포넌트 분석
The npm package next-render-analyzer receives a total of 18 weekly downloads. As such, next-render-analyzer popularity was classified as not popular.
We found that next-render-analyzer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.