Skip to content

Commit

Permalink
release-drink backport: Fix Webpack production mode compatibility (#6981
Browse files Browse the repository at this point in the history
)

* fix webpack prod mode compatibility

Closes #4359

* add a comment about ignoreGlobal
  • Loading branch information
jfirebaugh authored Jul 17, 2018
1 parent e1af72c commit 3f4acc8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
3 changes: 3 additions & 0 deletions build/rollup_plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ export const plugins = () => [
include: 'src/shaders/index.js'
}),
commonjs({
// global keyword handling causes Webpack compatibility issues, so we disabled it:
// https://github.com/mapbox/mapbox-gl-js/pull/6956
ignoreGlobal: true,
namedExports: {
'@mapbox/whoots-js': ['getTileBBox']
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"rollup": "^0.57.0",
"rollup-plugin-browserify-transform": "^1.0.1",
"rollup-plugin-buble": "^0.18.0",
"rollup-plugin-commonjs": "^8.2.6",
"rollup-plugin-commonjs": "^9.1.3",
"rollup-plugin-json": "^2.3.0",
"rollup-plugin-node-resolve": "3.0.0",
"rollup-plugin-replace": "^2.0.0",
Expand Down
17 changes: 8 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3843,9 +3843,9 @@ estree-walker@^0.3.0:
version "0.3.1"
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.3.1.tgz#e6b1a51cf7292524e7237c312e5fe6660c1ce1aa"

estree-walker@^0.5.0:
version "0.5.1"
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.5.1.tgz#64fc375053abc6f57d73e9bd2f004644ad3c5854"
estree-walker@^0.5.1:
version "0.5.2"
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.5.2.tgz#d3850be7529c9580d815600b53126515e146dd39"

esutils@^2.0.2:
version "2.0.2"
Expand Down Expand Up @@ -8762,14 +8762,13 @@ rollup-plugin-buble@^0.18.0:
buble "^0.18.0"
rollup-pluginutils "^2.0.1"

rollup-plugin-commonjs@^8.2.6:
version "8.3.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-8.3.0.tgz#91b4ba18f340951e39ed7b1901f377a80ab3f9c3"
rollup-plugin-commonjs@^9.1.3:
version "9.1.3"
resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.1.3.tgz#37bfbf341292ea14f512438a56df8f9ca3ba4d67"
dependencies:
acorn "^5.2.1"
estree-walker "^0.5.0"
estree-walker "^0.5.1"
magic-string "^0.22.4"
resolve "^1.4.0"
resolve "^1.5.0"
rollup-pluginutils "^2.0.1"

rollup-plugin-json@^2.3.0:
Expand Down

0 comments on commit 3f4acc8

Please sign in to comment.