Skip to content

Conversation

@DreamPaste
Copy link
Member

📌 개요

이번 PR에서 바뀐 내용을 한 줄 혹은 리스트 로 요약해주세요.

  • Proxy를 환경 변수로 분리해서 윈도우 호환성을 개선했습니다.

🗒 상세 설명

1. https모드와 http 모드를 사용할때 package.json에서 스크립트를 사용하지 않도록 했습니다.

2. build:analyze 를 개별 스크립트를 만들어서 윈도우 호환성을 개선했습니다.

📸 스크린샷

UI 변경이 있을 경우, Before / After 스크린샷을 첨부해주세요.

  • package.json에서 스크립트 사용 안함
image
  • 기존 명령어 정상 작동
image image

🔗 이슈

closes #95


✅ 체크리스트

  • [v] 코드가 스타일 가이드를 따릅니다

  • [v] 자체 코드 리뷰를 완료했습니다

  • [v] 복잡/핵심 로직에 주석을 추가했습니다

  • [v] 관심사 분리를 확인했습니다

  • [v] 잠재적 사이드이펙트를 점검했습니다

  • [] Vercel Preview로 테스트를 완료했습니다


@DreamPaste DreamPaste requested a review from youdaeng2 December 7, 2025 04:15
@DreamPaste DreamPaste self-assigned this Dec 7, 2025
Copilot AI review requested due to automatic review settings December 7, 2025 04:15
@DreamPaste DreamPaste added Fix 🔧 문제가 있는 내용을 수정합니다! 휘건 labels Dec 7, 2025
@linear
Copy link

linear bot commented Dec 7, 2025

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

이 PR은 Windows 환경에서의 호환성을 개선하기 위해 package.json 스크립트의 인라인 환경 변수를 별도 파일로 분리하는 작업입니다.

  • HTTPS 개발 서버용 환경 변수를 server.mjs로 이동
  • 번들 분석용 스크립트를 별도 파일(analyze.mjs)로 분리
  • package.json의 스크립트에서 플랫폼 의존적인 환경 변수 설정 제거

핵심 변경사항

새로운 파일 추가:

  • analyze.mjs: 번들 분석 빌드를 위한 독립 스크립트로, ANALYZE 환경 변수를 설정하고 Next.js 빌드를 실행합니다.

사용법:

# HTTP 모드 (프록시 비활성화)
npm run dev

# HTTPS 모드 (프록시 활성화)  
npm run dev:https

# 번들 분석
npm run build:analyze

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
apps/web/server.mjs HTTPS 개발 서버 실행 시 NEXT_PUBLIC_ENABLE_PROXY=true 환경 변수를 코드에서 설정하도록 추가
apps/web/package.json 스크립트에서 인라인 환경 변수 설정을 제거하여 크로스 플랫폼 호환성 개선
apps/web/analyze.mjs 번들 분석을 위한 독립 스크립트 파일 추가, ANALYZE 환경 변수를 설정하고 Next.js 빌드 실행

"scripts": {
"dev": "NEXT_PUBLIC_ENABLE_PROXY=false next dev",
"dev:https": "NEXT_PUBLIC_ENABLE_PROXY=true node server.mjs",
"dev": "next dev",
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dev 스크립트에서 NEXT_PUBLIC_ENABLE_PROXY 환경 변수가 설정되지 않았습니다. next.config.js의 로직에 따르면 이 변수가 설정되지 않으면 기본값이 true가 되어 프록시가 활성화됩니다.

기존 동작을 유지하려면 다음과 같이 별도의 스크립트 파일을 만들거나:

// dev.mjs
process.env.NEXT_PUBLIC_ENABLE_PROXY = 'false';
// next dev 실행 로직

또는 cross-env 같은 크로스 플랫폼 도구를 사용하는 것을 권장합니다:

"dev": "cross-env NEXT_PUBLIC_ENABLE_PROXY=false next dev"

Copilot uses AI. Check for mistakes.
shell: true,
env: { ...process.env },
});

Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

스폰된 프로세스의 에러 핸들링이 누락되었습니다. 프로세스 실행 중 발생할 수 있는 에러를 처리해야 합니다:

const build = spawn('next', ['build'], {
  stdio: 'inherit',
  shell: true,
  env: { ...process.env },
});

build.on('error', (err) => {
  console.error('Failed to start build process:', err);
  process.exit(1);
});

build.on('close', (code) => {
  process.exit(code);
});
Suggested change
build.on('error', (err) => {
console.error('Failed to start build process:', err);
process.exit(1);
});

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

github-actions bot commented Dec 7, 2025

@github-actions
Copy link

github-actions bot commented Dec 7, 2025

📦 번들 분석 결과

📊 번들 크기 요약

항목
📦 전체 번들 크기 3.7M
📄 JavaScript 크기 1.6M
🗂️ JavaScript 파일 수 61개

🔍 주요 청크 파일 (크기순)

fe98bb7c-75056deddb8826d9.js - 169K
framework-69e0f7d37422957b.js - 137K
main-448b0e12e0910adc.js - 130K
7147-4b792b1c613a0a9e.js - 122K
1762-0e7232d83dcb3887.js - 121K
polyfills-42372ed130431b0a.js - 110K
2877-2422cd6c39a97d65.js - 90K
6086-65069d4634f32053.js - 76K
page-3026af1cfd56a766.js - 31K
2906-7f73a91282e5669e.js - 28K

🤖 자동 생성된 번들 분석 리포트

@github-actions
Copy link

github-actions bot commented Dec 7, 2025

⚡ Lighthouse 성능 분석 결과

📊 전체 평균 점수

지표 점수
🚀 Performance 74점
♿ Accessibility 86점
✅ Best Practices 100점
🔍 SEO 100점

📈 측정 현황

  • 측정 성공: 15/16 페이지
  • 상태: success

📄 페이지별 상세 분석

🏠 커뮤니티 페이지: /main/community

지표 점수
🚀 Performance 69점
♿ Accessibility 78점
✅ Best Practices 100점
🔍 SEO 100점

📊 상세 분석 보기

👥 창업자 페이지: /main/founder

지표 점수
🚀 Performance 75점
♿ Accessibility 87점
✅ Best Practices 100점
🔍 SEO 100점

📊 상세 분석 보기

🏡 홈 페이지: /main/home

지표 점수
🚀 Performance 75점
♿ Accessibility 91점
✅ Best Practices 100점
🔍 SEO 100점

📊 상세 분석 보기

🗺️ 지도 페이지: /main/maps

지표 점수
🚀 Performance 75점
♿ Accessibility 87점
✅ Best Practices 100점
🔍 SEO 100점

📊 상세 분석 보기

👤 프로필 페이지: /main/profile

지표 점수
🚀 Performance 75점
♿ Accessibility 88점
✅ Best Practices 100점
🔍 SEO 100점

📊 상세 분석 보기

🔗 전체 상세 분석 결과

📊 전체 상세 Lighthouse 분석 결과 보기

📄 측정된 페이지

  • /main/community
  • /main/founder
  • /main/home
  • /main/maps
  • /main/profile

모든 페이지에서 성능 측정이 완료되었습니다.


🤖 자동 생성된 Lighthouse 성능 리포트

Copy link
Member

@youdaeng2 youdaeng2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

맥 살 걸 그랬네요.. 고생하셨습니다!

@DreamPaste DreamPaste merged commit b8ccd4c into dev Dec 7, 2025
10 checks passed
@DreamPaste DreamPaste deleted the fix/SOS-51-env branch December 7, 2025 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Fix 🔧 문제가 있는 내용을 수정합니다! 휘건

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fix] 프록시 환경변수 분리

3 participants