Skip to content

Commit

Permalink
Mapbox webpack resolver no longer needed in examples (#577)
Browse files Browse the repository at this point in the history
  • Loading branch information
schnerd authored Aug 13, 2018
1 parent 9c302ae commit 489d338
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 84 deletions.
9 changes: 1 addition & 8 deletions examples/additional-overlays/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,14 @@ const config = {

module: {
rules: [{
// Compile ES2015 using bable
// Compile ES2015 using babel
test: /\.js$/,
loader: 'babel-loader',
include: [resolve('.')],
exclude: [/node_modules/]
}]
},

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'])
Expand Down
9 changes: 1 addition & 8 deletions examples/controls/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const config = {

module: {
rules: [{
// Compile ES2015 using bable
// Compile ES2015 using babel
test: /\.js$/,
include: [resolve('.')],
exclude: [/node_modules/],
Expand All @@ -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'])
Expand Down
4 changes: 1 addition & 3 deletions examples/deckgl-overlay/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
},

Expand Down
9 changes: 1 addition & 8 deletions examples/exhibit-webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,14 @@ const config = {

module: {
rules: [{
// Compile ES2015 using bable
// Compile ES2015 using babel
test: /\.js$/,
loader: 'babel-loader',
include: [resolve('.')],
exclude: [/node_modules/]
}]
},

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'])
Expand Down
9 changes: 1 addition & 8 deletions examples/filter/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const config = {

module: {
rules: [{
// Compile ES2015 using bable
// Compile ES2015 using babel
test: /\.js$/,
include: [resolve('.')],
exclude: [/node_modules/],
Expand All @@ -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'])
Expand Down
9 changes: 1 addition & 8 deletions examples/geojson-animation/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const config = {

module: {
rules: [{
// Compile ES2015 using bable
// Compile ES2015 using babel
test: /\.js$/,
include: [resolve('.')],
exclude: [/node_modules/],
Expand All @@ -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'])
Expand Down
9 changes: 1 addition & 8 deletions examples/geojson/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const config = {

module: {
rules: [{
// Compile ES2015 using bable
// Compile ES2015 using babel
test: /\.js$/,
include: [resolve('.')],
exclude: [/node_modules/],
Expand All @@ -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'])
Expand Down
9 changes: 1 addition & 8 deletions examples/interaction/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const config = {

module: {
rules: [{
// Compile ES2015 using bable
// Compile ES2015 using babel
test: /\.js$/,
include: [resolve('.')],
exclude: [/node_modules/],
Expand All @@ -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'])
Expand Down
9 changes: 1 addition & 8 deletions examples/layers/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const config = {

module: {
rules: [{
// Compile ES2015 using bable
// Compile ES2015 using babel
test: /\.js$/,
include: [resolve('.')],
exclude: [/node_modules/],
Expand All @@ -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'])
Expand Down
2 changes: 1 addition & 1 deletion examples/main/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const config = {

module: {
rules: [{
// Compile ES2015 using bable
// Compile ES2015 using babel
test: /\.js$/,
exclude: [/node_modules/],
use: [{
Expand Down
9 changes: 1 addition & 8 deletions examples/reuse-map/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const config = {

module: {
rules: [{
// Compile ES2015 using bable
// Compile ES2015 using babel
test: /\.js$/,
include: [resolve('.')],
exclude: [/node_modules/],
Expand All @@ -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'])
Expand Down
9 changes: 1 addition & 8 deletions examples/viewport-animation/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const config = {

module: {
rules: [{
// Compile ES2015 using bable
// Compile ES2015 using babel
test: /\.js$/,
include: [resolve('.')],
exclude: [/node_modules/],
Expand All @@ -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'])
Expand Down

0 comments on commit 489d338

Please sign in to comment.