fix(map): ScatMap scatDetailData import 제거 + Vite shimMissingExports 설정

- 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 <noreply@anthropic.com>
This commit is contained in:
htlee 2026-03-01 03:04:11 +09:00
부모 353047dede
커밋 195e69c86d
2개의 변경된 파일9개의 추가작업 그리고 2개의 파일을 삭제

파일 보기

@ -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],
)

파일 보기

@ -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,
},
},
})