mirror of
https://github.com/visgl/react-map-gl.git
synced 2026-01-18 15:54:22 +00:00
Mapbox webpack resolver no longer needed in examples (#577)
This commit is contained in:
parent
9c302ae840
commit
489d33832b
@ -11,7 +11,7 @@ const config = {
|
||||
|
||||
module: {
|
||||
rules: [{
|
||||
// Compile ES2015 using bable
|
||||
// Compile ES2015 using babel
|
||||
test: /\.js$/,
|
||||
loader: 'babel-loader',
|
||||
include: [resolve('.')],
|
||||
@ -19,13 +19,6 @@ const config = {
|
||||
}]
|
||||
},
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
// From mapbox-gl-js README. Required for non-browserify bundlers (e.g. webpack):
|
||||
'mapbox-gl$': resolve('./node_modules/mapbox-gl/dist/mapbox-gl.js')
|
||||
}
|
||||
},
|
||||
|
||||
// Optional: Enables reading mapbox token from environment variable
|
||||
plugins: [
|
||||
new webpack.EnvironmentPlugin(['MapboxAccessToken'])
|
||||
|
||||
@ -28,7 +28,7 @@ const config = {
|
||||
|
||||
module: {
|
||||
rules: [{
|
||||
// Compile ES2015 using bable
|
||||
// Compile ES2015 using babel
|
||||
test: /\.js$/,
|
||||
include: [resolve('.')],
|
||||
exclude: [/node_modules/],
|
||||
@ -39,13 +39,6 @@ const config = {
|
||||
}]
|
||||
},
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
// From mapbox-gl-js README. Required for non-browserify bundlers (e.g. webpack):
|
||||
'mapbox-gl$': resolve('./node_modules/mapbox-gl/dist/mapbox-gl.js')
|
||||
}
|
||||
},
|
||||
|
||||
// Optional: Enables reading mapbox token from environment variable
|
||||
plugins: [
|
||||
new webpack.EnvironmentPlugin(['MapboxAccessToken'])
|
||||
|
||||
@ -24,9 +24,7 @@ const config = {
|
||||
// Work against the latest base library in this repo
|
||||
'react-map-gl': resolve(LIB_DIR),
|
||||
// Ensure only one copy of react
|
||||
react: resolve('./node_modules/react'),
|
||||
// Per mapbox-gl-js README for non-browserify bundlers
|
||||
'mapbox-gl$': resolve(`${LIB_DIR}/node_modules/mapbox-gl/dist/mapbox-gl.js`)
|
||||
react: resolve('./node_modules/react')
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ const config = {
|
||||
|
||||
module: {
|
||||
rules: [{
|
||||
// Compile ES2015 using bable
|
||||
// Compile ES2015 using babel
|
||||
test: /\.js$/,
|
||||
loader: 'babel-loader',
|
||||
include: [resolve('.')],
|
||||
@ -22,13 +22,6 @@ const config = {
|
||||
}]
|
||||
},
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
// From mapbox-gl-js README. Required for non-browserify bundlers (e.g. webpack):
|
||||
'mapbox-gl$': resolve('./node_modules/mapbox-gl/dist/mapbox-gl.js')
|
||||
}
|
||||
},
|
||||
|
||||
// Optional: Enables reading mapbox token from environment variable
|
||||
plugins: [
|
||||
new webpack.EnvironmentPlugin(['MapboxAccessToken'])
|
||||
|
||||
@ -28,7 +28,7 @@ const config = {
|
||||
|
||||
module: {
|
||||
rules: [{
|
||||
// Compile ES2015 using bable
|
||||
// Compile ES2015 using babel
|
||||
test: /\.js$/,
|
||||
include: [resolve('.')],
|
||||
exclude: [/node_modules/],
|
||||
@ -39,13 +39,6 @@ const config = {
|
||||
}]
|
||||
},
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
// From mapbox-gl-js README. Required for non-browserify bundlers (e.g. webpack):
|
||||
'mapbox-gl$': resolve('./node_modules/mapbox-gl/dist/mapbox-gl.js')
|
||||
}
|
||||
},
|
||||
|
||||
// Optional: Enables reading mapbox token from environment variable
|
||||
plugins: [
|
||||
new webpack.EnvironmentPlugin(['MapboxAccessToken'])
|
||||
|
||||
@ -28,7 +28,7 @@ const config = {
|
||||
|
||||
module: {
|
||||
rules: [{
|
||||
// Compile ES2015 using bable
|
||||
// Compile ES2015 using babel
|
||||
test: /\.js$/,
|
||||
include: [resolve('.')],
|
||||
exclude: [/node_modules/],
|
||||
@ -39,13 +39,6 @@ const config = {
|
||||
}]
|
||||
},
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
// From mapbox-gl-js README. Required for non-browserify bundlers (e.g. webpack):
|
||||
'mapbox-gl$': resolve('./node_modules/mapbox-gl/dist/mapbox-gl.js')
|
||||
}
|
||||
},
|
||||
|
||||
// Optional: Enables reading mapbox token from environment variable
|
||||
plugins: [
|
||||
new webpack.EnvironmentPlugin(['MapboxAccessToken'])
|
||||
|
||||
@ -35,7 +35,7 @@ const config = {
|
||||
|
||||
module: {
|
||||
rules: [{
|
||||
// Compile ES2015 using bable
|
||||
// Compile ES2015 using babel
|
||||
test: /\.js$/,
|
||||
include: [resolve('.')],
|
||||
exclude: [/node_modules/],
|
||||
@ -46,13 +46,6 @@ const config = {
|
||||
}]
|
||||
},
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
// From mapbox-gl-js README. Required for non-browserify bundlers (e.g. webpack):
|
||||
'mapbox-gl$': resolve('./node_modules/mapbox-gl/dist/mapbox-gl.js')
|
||||
}
|
||||
},
|
||||
|
||||
// Optional: Enables reading mapbox token from environment variable
|
||||
plugins: [
|
||||
new webpack.EnvironmentPlugin(['MapboxAccessToken'])
|
||||
|
||||
@ -28,7 +28,7 @@ const config = {
|
||||
|
||||
module: {
|
||||
rules: [{
|
||||
// Compile ES2015 using bable
|
||||
// Compile ES2015 using babel
|
||||
test: /\.js$/,
|
||||
include: [resolve('.')],
|
||||
exclude: [/node_modules/],
|
||||
@ -39,13 +39,6 @@ const config = {
|
||||
}]
|
||||
},
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
// From mapbox-gl-js README. Required for non-browserify bundlers (e.g. webpack):
|
||||
'mapbox-gl$': resolve('./node_modules/mapbox-gl/dist/mapbox-gl.js')
|
||||
}
|
||||
},
|
||||
|
||||
// Optional: Enables reading mapbox token from environment variable
|
||||
plugins: [
|
||||
new webpack.EnvironmentPlugin(['MapboxAccessToken'])
|
||||
|
||||
@ -28,7 +28,7 @@ const config = {
|
||||
|
||||
module: {
|
||||
rules: [{
|
||||
// Compile ES2015 using bable
|
||||
// Compile ES2015 using babel
|
||||
test: /\.js$/,
|
||||
include: [resolve('.')],
|
||||
exclude: [/node_modules/],
|
||||
@ -39,13 +39,6 @@ const config = {
|
||||
}]
|
||||
},
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
// From mapbox-gl-js README. Required for non-browserify bundlers (e.g. webpack):
|
||||
'mapbox-gl$': resolve('./node_modules/mapbox-gl/dist/mapbox-gl.js')
|
||||
}
|
||||
},
|
||||
|
||||
// Optional: Enables reading mapbox token from environment variable
|
||||
plugins: [
|
||||
new webpack.EnvironmentPlugin(['MapboxAccessToken'])
|
||||
|
||||
@ -38,7 +38,7 @@ const config = {
|
||||
|
||||
module: {
|
||||
rules: [{
|
||||
// Compile ES2015 using bable
|
||||
// Compile ES2015 using babel
|
||||
test: /\.js$/,
|
||||
exclude: [/node_modules/],
|
||||
use: [{
|
||||
|
||||
@ -28,7 +28,7 @@ const config = {
|
||||
|
||||
module: {
|
||||
rules: [{
|
||||
// Compile ES2015 using bable
|
||||
// Compile ES2015 using babel
|
||||
test: /\.js$/,
|
||||
include: [resolve('.')],
|
||||
exclude: [/node_modules/],
|
||||
@ -39,13 +39,6 @@ const config = {
|
||||
}]
|
||||
},
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
// From mapbox-gl-js README. Required for non-browserify bundlers (e.g. webpack):
|
||||
'mapbox-gl$': resolve('./node_modules/mapbox-gl/dist/mapbox-gl.js')
|
||||
}
|
||||
},
|
||||
|
||||
// Optional: Enables reading mapbox token from environment variable
|
||||
plugins: [
|
||||
new webpack.EnvironmentPlugin(['MapboxAccessToken'])
|
||||
|
||||
@ -28,7 +28,7 @@ const config = {
|
||||
|
||||
module: {
|
||||
rules: [{
|
||||
// Compile ES2015 using bable
|
||||
// Compile ES2015 using babel
|
||||
test: /\.js$/,
|
||||
include: [resolve('.')],
|
||||
exclude: [/node_modules/],
|
||||
@ -39,13 +39,6 @@ const config = {
|
||||
}]
|
||||
},
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
// From mapbox-gl-js README. Required for non-browserify bundlers (e.g. webpack):
|
||||
'mapbox-gl$': resolve('./node_modules/mapbox-gl/dist/mapbox-gl.js')
|
||||
}
|
||||
},
|
||||
|
||||
// Optional: Enables reading mapbox token from environment variable
|
||||
plugins: [
|
||||
new webpack.EnvironmentPlugin(['MapboxAccessToken'])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user