From 195e69c86d00ac00c5d2c6ff33364ddc377c6fb2 Mon Sep 17 00:00:00 2001 From: htlee Date: Sun, 1 Mar 2026 03:04:11 +0900 Subject: [PATCH] =?UTF-8?q?fix(map):=20ScatMap=20scatDetailData=20import?= =?UTF-8?q?=20=EC=A0=9C=EA=B1=B0=20+=20Vite=20shimMissingExports=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - scatDetailData는 scatConstants에 없는 export — import 제거, seg.id 직접 사용 - deck.gl → @loaders.gl/worker-utils가 Node.js child_process.spawn 참조하나 브라우저에서 미사용 코드 경로이므로 shimMissingExports: true로 해결 Co-Authored-By: Claude Opus 4.6 --- frontend/src/tabs/scat/components/ScatMap.tsx | 4 ++-- frontend/vite.config.ts | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/frontend/src/tabs/scat/components/ScatMap.tsx b/frontend/src/tabs/scat/components/ScatMap.tsx index 382258a..2bbc86b 100644 --- a/frontend/src/tabs/scat/components/ScatMap.tsx +++ b/frontend/src/tabs/scat/components/ScatMap.tsx @@ -5,7 +5,7 @@ import { PathLayer, ScatterplotLayer } from '@deck.gl/layers' import type { StyleSpecification } from 'maplibre-gl' import 'maplibre-gl/dist/maplibre-gl.css' import type { ScatSegment } from './scatTypes' -import { esiColor, jejuCoastCoords, scatDetailData } from './scatConstants' +import { esiColor, jejuCoastCoords } from './scatConstants' import { hexToRgba } from '@common/components/map/mapUtils' const BASE_STYLE: StyleSpecification = { @@ -102,7 +102,7 @@ function ScatMap({ segments, selectedSeg, onSelectSeg, onOpenPopup }: ScatMapPro const handleClick = useCallback( (seg: ScatSegment) => { onSelectSeg(seg) - onOpenPopup(seg.id % scatDetailData.length) + onOpenPopup(seg.id) }, [onSelectSeg, onOpenPopup], ) diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index ccf4196..2711f53 100755 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -11,4 +11,11 @@ export default defineConfig({ '@tabs': path.resolve(__dirname, 'src/tabs'), }, }, + build: { + rollupOptions: { + // deck.gl → @loaders.gl/worker-utils가 Node.js child_process를 참조하나 + // 브라우저에서는 해당 코드 경로를 타지 않으므로 undefined shim 허용 + shimMissingExports: true, + }, + }, }) -- 2.45.2