diff --git a/package.json b/package.json index ba93c2f..b1e60cc 100644 --- a/package.json +++ b/package.json @@ -25,8 +25,8 @@ "lodash.clonedeep": "^4.5.0", "lodash.throttle": "^4.1.1", "lodash.topairs": "^4.3.0", - "mapbox-gl": "mapbox/mapbox-gl-js#6c24b9621d2aa770eda67fb5638b4d78087b5624", - "mapbox-gl-style-spec": "mapbox/mapbox-gl-style-spec#e85407a377510acb647161de6be6357ab4f606dd", + "mapbox-gl": "^0.29.0", + "mapbox-gl-style-spec": "^8.11.0", "mousetrap": "^1.6.0", "ol-mapbox-style": "0.0.11", "openlayers": "^3.19.1", diff --git a/src/components/map/InspectionMap.jsx b/src/components/map/InspectionMap.jsx index 9f58e89..3beda19 100644 --- a/src/components/map/InspectionMap.jsx +++ b/src/components/map/InspectionMap.jsx @@ -1,6 +1,6 @@ import React from 'react' import ReactDOM from 'react-dom' -import MapboxGl from 'mapbox-gl' +import MapboxGl from 'mapbox-gl/dist/mapbox-gl.js' import validateColor from 'mapbox-gl-style-spec/lib/validate/validate_color' import colors from '../../config/colors' import style from '../../libs/style' diff --git a/src/components/map/MapboxGlMap.jsx b/src/components/map/MapboxGlMap.jsx index a010532..1c4888b 100644 --- a/src/components/map/MapboxGlMap.jsx +++ b/src/components/map/MapboxGlMap.jsx @@ -1,6 +1,6 @@ import React from 'react' import ReactDOM from 'react-dom' -import MapboxGl from 'mapbox-gl' +import MapboxGl from 'mapbox-gl/dist/mapbox-gl.js' import FeatureLayerTable from './FeatureLayerTable' import validateColor from 'mapbox-gl-style-spec/lib/validate/validate_color' import style from '../../libs/style.js' diff --git a/webpack.config.js b/webpack.config.js index 1b10dd0..aa0de92 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -31,19 +31,12 @@ module.exports = { }, resolve: { alias: { - 'webworkify': 'webworkify-webpack', - // TODO: otherwise I get a max call stack error in browser? - // 'mapbox-gl': path.resolve('./node_modules/mapbox-gl/dist/mapbox-gl.js') + 'webworkify': 'webworkify-webpack' }, extensions: ['', '.js', '.jsx'] }, module: { - loaders, - postLoaders: [{ - include: /node_modules\/mapbox-gl\/js\/render\/shaders.js/, - loader: 'transform', - query: 'brfs' - }] + loaders }, node: { fs: "empty", diff --git a/webpack.loaders.js b/webpack.loaders.js index 00b5142..e902c3f 100644 --- a/webpack.loaders.js +++ b/webpack.loaders.js @@ -13,15 +13,6 @@ 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]' @@ -50,11 +41,6 @@ module.exports = [ test: /\.json$/, loader: 'json-loader' }, - { - test: /\.js$/, - include: /node_modules\/mapbox-gl\/js\/render\/shaders.js/, - loader: 'transform/cacheable?brfs' - }, { test: /[\/\\](node_modules|global|src)[\/\\].*\.css$/, loaders: [ diff --git a/webpack.production.config.js b/webpack.production.config.js index 3543a67..0848a7a 100644 --- a/webpack.production.config.js +++ b/webpack.production.config.js @@ -17,7 +17,7 @@ module.exports = { app: './src/index.jsx', vendor: [ 'file-saver', - 'mapbox-gl', + 'mapbox-gl/dist/mapbox-gl.js', //TODO: Build failure because cannot resolve migrations file //"mapbox-gl-style-spec", "randomcolor", @@ -51,12 +51,7 @@ module.exports = { extensions: ['', '.js', '.jsx'] }, module: { - loaders, - postLoaders: [{ - include: /node_modules\/mapbox-gl-shaders/, - loader: 'transform', - query: 'brfs' - }] + loaders }, node: { fs: "empty",