fix: webforai.kr 번들에서 Supabase 접속 정보를 뺀다
lib/supabase.ts 의 최상단 createClient() 가 부수효과로 남아, 쓰는 곳이 없는 공개 배포에도 Supabase URL·anon 키가 실렸다. 이 키로 marketing_reports 등 실제 병원 데이터 테이블을 읽을 수 있었다. supabase 모듈을 부수효과 없는 모듈로 표시해 쓰지 않으면 번들에서 빠지게 한다. infinith-demo 빌드는 그대로 쓴다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
b4d983a7d4
commit
c2e7d5adfc
@ -113,7 +113,9 @@ export default defineConfig(({mode}) => {
|
||||
treeshake: {
|
||||
// src/data(목업·진단 데이터)와 src/services 는 import 만으로 할 일이 없는 모듈이다. 쓰는 곳이 없으면 번들에서 뺀다.
|
||||
// 파생 목업의 최상단 객체 펼치기를 부수효과로 보고 실제 병원 목업이 공개 번들에 남던 문제를 막는다.
|
||||
moduleSideEffects: (id: string) => !/[\\/]src[\\/](data|services)[\\/]/.test(id),
|
||||
// src/lib/supabase 도 같다. 최상단 createClient() 때문에 공개 배포에 Supabase 접속 정보가 남았다 (2026-10-07).
|
||||
moduleSideEffects: (id: string) =>
|
||||
!/[\\/]src[\\/](data|services)[\\/]/.test(id) && !/[\\/]src[\\/]lib[\\/]supabase\.ts$/.test(id),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user