From fb36bb891e19e9ef100a6499aec68801de1a20ae Mon Sep 17 00:00:00 2001 From: Ib Green Date: Mon, 11 Jun 2018 08:09:33 -0700 Subject: [PATCH] Log react-map-gl version number (#524) --- src/mapbox/mapbox.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mapbox/mapbox.js b/src/mapbox/mapbox.js index 6dc5734d..894d73e6 100644 --- a/src/mapbox/mapbox.js +++ b/src/mapbox/mapbox.js @@ -112,7 +112,12 @@ export default class Mapbox { if (!Mapbox.initialized && console.debug) { // eslint-disable-line Mapbox.initialized = true; - console.debug(`react-map-gl: using mapbox-gl v${props.mapboxgl.version}`); // eslint-disable-line + + // Version detection using babel plugin + /* global __VERSION__ */ + const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'untranspiled source'; + + console.debug(`react-map-gl: ${VERSION} using mapbox-gl v${props.mapboxgl.version}`); // eslint-disable-line } this.props = {};