Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
Get Started with Kepler.gl + Vite
A minimal example showing how to integrate Kepler.gl into a React/Redux app using Vite as the build tool.
Pre-requirements
- Node.js ^20.x
- Yarn 4.4.0: See the detailed installation instructions.
1. Install Dependencies
Go to the examples/get-started-vite directory and run:
touch yarn.lock && yarn
touch yarn.lockis required once to mark this directory as a standalone Yarn project, independent of the monorepo root.
2. Start the App
yarn dev
The app will be available at http://localhost:8081.
Production Build
yarn build
yarn preview
Notes
@turf/rewind interop shim
vite.config.ts contains a small plugin that patches @turf/rewind to expose
a named rewind export. The package's ESM entry only has export default rewind
(no named export), but @deck.gl-community/editable-layers imports it as
import { rewind } from '@turf/rewind'. Without the patch, Rollup/Vite silently
resolves the named import to undefined, throwing ... is not a function at
runtime when finishing a polygon draw. Remove the plugin once @turf/rewind
adds a named export.