You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We got a Uncaught ReferenceError: e is not defined on a clients test environment that uses a React version of Mapbox GL. After digging in that error, there's a possible solution in the Uglify options in Webpack: alex3165/react-mapbox-gl#200 (comment)
typeofs: false is the fix
/build/lib/build.js
newUglifyJsPlugin({cache: true,parallel: true,sourceMap: true,uglifyOptions: {compress: {typeofs: false/* added so the build works with Mapbox: https://github.com/alex3165/react-mapbox-gl/issues/200#issuecomment-370175270 */}}})
What typeofs: false does:
typeofs (default: true) -- Transforms typeof foo == "undefined" into foo === void 0. Note: recommend to set this value to false for IE10 and earlier versions due to known issues.
Tested locally and issue is fixed with this. But we need this in the build asap so our test environment can use this :)
The text was updated successfully, but these errors were encountered:
It seems the used library released a newer version (3.3.2) on NPM (not in their GitHub repo) which fixes the Mapbox problem. So we'll use that: https://www.npmjs.com/package/react-map-gl
I'll close this issue, since we resolved it that way.
We got a
Uncaught ReferenceError: e is not defined
on a clients test environment that uses a React version of Mapbox GL. After digging in that error, there's a possible solution in the Uglify options in Webpack: alex3165/react-mapbox-gl#200 (comment)typeofs: false
is the fix/build/lib/build.js
What
typeofs: false
does:Tested locally and issue is fixed with this. But we need this in the build asap so our test environment can use this :)
The text was updated successfully, but these errors were encountered: