From 220295442ccb5f2381cffd1981d2f2aa97cba2fa Mon Sep 17 00:00:00 2001 From: Lukas Martinelli Date: Mon, 19 Dec 2016 12:51:23 +0100 Subject: [PATCH] Upgrade to Mapbox GL 0.28 --- package.json | 3 ++- src/gl.jsx | 2 +- webpack.loaders.js | 9 +++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a81d51b..9c4ad0c 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "color": "^1.0.3", "file-saver": "^1.3.2", "immutable": "^3.8.1", - "mapbox-gl": "^0.24.0", + "mapbox-gl": "^0.28.0", "mapbox-gl-style-spec": "mapbox/mapbox-gl-style-spec#83b1a3e5837d785af582efd5ed1a212f2df6a4ae", "ol-mapbox-style": "0.0.11", "openlayers": "^3.19.1", @@ -83,6 +83,7 @@ "babel-loader": "6.2.4", "babel-plugin-transform-class-properties": "^6.11.5", "babel-plugin-transform-decorators-legacy": "^1.3.4", + "babel-plugin-transform-flow-strip-types": "^6.21.0", "babel-plugin-transform-object-rest-spread": "^6.8.0", "babel-plugin-transform-runtime": "^6.15.0", "babel-preset-es2015": "6.14.0", diff --git a/src/gl.jsx b/src/gl.jsx index 965d899..52d28b3 100644 --- a/src/gl.jsx +++ b/src/gl.jsx @@ -1,5 +1,5 @@ import React from 'react' -import MapboxGl from 'mapbox-gl'; +import MapboxGl from 'mapbox-gl' import { fullHeight } from './theme.js' import style from './style.js' import { Map } from './map.jsx' diff --git a/webpack.loaders.js b/webpack.loaders.js index b7bf4b3..60c2406 100644 --- a/webpack.loaders.js +++ b/webpack.loaders.js @@ -13,6 +13,15 @@ module.exports = [ plugins: ['transform-runtime', 'transform-decorators-legacy', 'transform-class-properties'], } }, + { + test: /\.js?$/, + include: /node_modules\/mapbox-gl\//, + loader: 'babel', + query: { + presets: ['react'], + plugins: ['transform-flow-strip-types'], + } + }, { test: /\.(eot|svg|ttf|woff|woff2)$/, loader: 'file?name=fonts/[name].[ext]'