Upgraded reference to mapbox-gl to v0.29.0 to follow their latest webpack recommendations and support Windows dev. This is addressed in mapbox/mapbox-gl-js#3724

This commit is contained in:
PetersonGIS 2016-12-28 11:10:27 -07:00
parent 80678af691
commit 58897f1856
6 changed files with 8 additions and 34 deletions

View file

@ -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",

View file

@ -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'

View file

@ -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'

View file

@ -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",

View file

@ -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: [

View file

@ -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",