fix(site): PostHog 빌드 변수에 PUBLIC_ 접두사를 단다 - #106
Merged
Merged
Conversation
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
|
minjun0219
marked this pull request as ready for review
October 3, 2026 23:46
브라우저로 나가는 값은 프레임워크의 공개 접두사를 유지한다는 표준(Astro 는 `PUBLIC_`)에 맞춘다 — `POSTHOG_KEY` · `POSTHOG_HOST` 를 `PUBLIC_POSTHOG_KEY` · `PUBLIC_POSTHOG_HOST` 로. 동작은 같다 — 하나라도 없으면 초기화하지 않고 SDK 코드도 담지 않는다. 프로덕션 빌드 변수에는 새 이름을 먼저 더해 두었다. 이 변경이 배포되고 이벤트가 확인되면 옛 이름을 지운다. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
minjun0219
force-pushed
the
feat/site-posthog-public-env
branch
from
October 4, 2026 01:17
0799ea7 to
e0b2d57
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PostHog 빌드 변수 이름에 Astro 의 공개 접두사를 단다 —
POSTHOG_KEY·POSTHOG_HOST→PUBLIC_POSTHOG_KEY·PUBLIC_POSTHOG_HOST. 브라우저로 나가는 값은 프레임워크의 공개 접두사를 유지한다는 표준에 맞춘 것이고, 동작은 #105 와 같다.변경 사항
스키마와 import 의 이름만 바뀐다
하나라도 없으면 초기화하지 않고 SDK 코드도 담지 않는 동작은 그대로다. 옛 이름(
POSTHOG_*)은 더 이상 읽지 않는다.site/astro.config.mjs:79
site/src/analytics.ts:4
배포 변수는 두 이름이 잠시 같이 있다
프로덕션 빌드 변수에
PUBLIC_POSTHOG_*를 같은 값으로 먼저 더해 두었다. 이 PR 이 배포되고$host = mdwire.minjun.dev이벤트가 확인되면POSTHOG_*를 지운다.검증
변수 없음 · 새 이름 · 옛 이름만, 세 경우로
pnpm run check와pnpm run build를 돌렸다 — 없음과 옛 이름만은 SDK 참조 없이 통과(레이아웃 청크가 main 과 동일), 새 이름은 둘 다 번들에 들어가 통과. 실제 이벤트 확인은 머지 뒤 프로덕션 빌드에서 한다.🤖 Generated with Claude Code