mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 02:25:29 +01:00
Merge pull request #36 from PetersonGIS/upgrade-mapboxgl
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:
commit
a0e1e6152b
6 changed files with 8 additions and 34 deletions
|
@ -25,8 +25,8 @@
|
||||||
"lodash.clonedeep": "^4.5.0",
|
"lodash.clonedeep": "^4.5.0",
|
||||||
"lodash.throttle": "^4.1.1",
|
"lodash.throttle": "^4.1.1",
|
||||||
"lodash.topairs": "^4.3.0",
|
"lodash.topairs": "^4.3.0",
|
||||||
"mapbox-gl": "mapbox/mapbox-gl-js#6c24b9621d2aa770eda67fb5638b4d78087b5624",
|
"mapbox-gl": "^0.29.0",
|
||||||
"mapbox-gl-style-spec": "mapbox/mapbox-gl-style-spec#e85407a377510acb647161de6be6357ab4f606dd",
|
"mapbox-gl-style-spec": "^8.11.0",
|
||||||
"mousetrap": "^1.6.0",
|
"mousetrap": "^1.6.0",
|
||||||
"ol-mapbox-style": "0.0.11",
|
"ol-mapbox-style": "0.0.11",
|
||||||
"openlayers": "^3.19.1",
|
"openlayers": "^3.19.1",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import ReactDOM from 'react-dom'
|
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 validateColor from 'mapbox-gl-style-spec/lib/validate/validate_color'
|
||||||
import colors from '../../config/colors'
|
import colors from '../../config/colors'
|
||||||
import style from '../../libs/style'
|
import style from '../../libs/style'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import ReactDOM from 'react-dom'
|
import ReactDOM from 'react-dom'
|
||||||
import MapboxGl from 'mapbox-gl'
|
import MapboxGl from 'mapbox-gl/dist/mapbox-gl.js'
|
||||||
import FeatureLayerTable from './FeatureLayerTable'
|
import FeatureLayerTable from './FeatureLayerTable'
|
||||||
import validateColor from 'mapbox-gl-style-spec/lib/validate/validate_color'
|
import validateColor from 'mapbox-gl-style-spec/lib/validate/validate_color'
|
||||||
import style from '../../libs/style.js'
|
import style from '../../libs/style.js'
|
||||||
|
|
|
@ -31,19 +31,12 @@ module.exports = {
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'webworkify': 'webworkify-webpack',
|
'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')
|
|
||||||
},
|
},
|
||||||
extensions: ['', '.js', '.jsx']
|
extensions: ['', '.js', '.jsx']
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
loaders,
|
loaders
|
||||||
postLoaders: [{
|
|
||||||
include: /node_modules\/mapbox-gl\/js\/render\/shaders.js/,
|
|
||||||
loader: 'transform',
|
|
||||||
query: 'brfs'
|
|
||||||
}]
|
|
||||||
},
|
},
|
||||||
node: {
|
node: {
|
||||||
fs: "empty",
|
fs: "empty",
|
||||||
|
|
|
@ -13,15 +13,6 @@ module.exports = [
|
||||||
plugins: ['transform-runtime', 'transform-decorators-legacy', 'transform-class-properties'],
|
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)$/,
|
test: /\.(eot|svg|ttf|woff|woff2)$/,
|
||||||
loader: 'file?name=fonts/[name].[ext]'
|
loader: 'file?name=fonts/[name].[ext]'
|
||||||
|
@ -50,11 +41,6 @@ module.exports = [
|
||||||
test: /\.json$/,
|
test: /\.json$/,
|
||||||
loader: 'json-loader'
|
loader: 'json-loader'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
test: /\.js$/,
|
|
||||||
include: /node_modules\/mapbox-gl\/js\/render\/shaders.js/,
|
|
||||||
loader: 'transform/cacheable?brfs'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
test: /[\/\\](node_modules|global|src)[\/\\].*\.css$/,
|
test: /[\/\\](node_modules|global|src)[\/\\].*\.css$/,
|
||||||
loaders: [
|
loaders: [
|
||||||
|
|
|
@ -17,7 +17,7 @@ module.exports = {
|
||||||
app: './src/index.jsx',
|
app: './src/index.jsx',
|
||||||
vendor: [
|
vendor: [
|
||||||
'file-saver',
|
'file-saver',
|
||||||
'mapbox-gl',
|
'mapbox-gl/dist/mapbox-gl.js',
|
||||||
//TODO: Build failure because cannot resolve migrations file
|
//TODO: Build failure because cannot resolve migrations file
|
||||||
//"mapbox-gl-style-spec",
|
//"mapbox-gl-style-spec",
|
||||||
"randomcolor",
|
"randomcolor",
|
||||||
|
@ -51,12 +51,7 @@ module.exports = {
|
||||||
extensions: ['', '.js', '.jsx']
|
extensions: ['', '.js', '.jsx']
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
loaders,
|
loaders
|
||||||
postLoaders: [{
|
|
||||||
include: /node_modules\/mapbox-gl-shaders/,
|
|
||||||
loader: 'transform',
|
|
||||||
query: 'brfs'
|
|
||||||
}]
|
|
||||||
},
|
},
|
||||||
node: {
|
node: {
|
||||||
fs: "empty",
|
fs: "empty",
|
||||||
|
|
Loading…
Reference in a new issue