Log react-map-gl version number (#524)

This commit is contained in:
Ib Green 2018-06-11 08:09:33 -07:00 committed by GitHub
parent b5e2c7fab9
commit fb36bb891e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 = {};