Use mapbox-gl with Webpack Adapted from: https://docs.mapbox.com/help/tutorials/make-a-heatmap-with-mapbox-gl-js/ Building and running on localhost First install dependencies: npm install To create a production build: npm run build To develop: npm run dev Output dist/bundle.js