Skip to content

Commit 6fcbc75

Browse files
authored
Merge pull request #5449 from plotly/require-unminified-mapbox-gl
Require unminified mapbox-gl for unminified bundles and improve compression of minified bundles
2 parents 8c5b725 + 3084e74 commit 6fcbc75

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

src/plots/mapbox/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
var mapboxgl = require('mapbox-gl');
3+
var mapboxgl = require('mapbox-gl/dist/mapbox-gl-unminified');
44

55
var Lib = require('../../lib');
66
var strTranslate = Lib.strTranslate;

src/plots/mapbox/mapbox.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
var mapboxgl = require('mapbox-gl');
3+
var mapboxgl = require('mapbox-gl/dist/mapbox-gl-unminified');
44

55
var Lib = require('../../lib');
66
var geoUtils = require('../../lib/geo_location_utils');

tasks/util/constants.js

-9
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,6 @@ module.exports = {
9999
uglifyOptions: {
100100
ecma: 5,
101101
mangle: true,
102-
compress: {
103-
// see full list of compress option
104-
// https://github.com/fabiosantoscode/terser#compress-options
105-
//
106-
// need to turn off 'typeofs' to make mapbox-gl work in
107-
// minified bundles, for more info see:
108-
// https://github.com/plotly/plotly.js/issues/2787
109-
typeofs: false
110-
},
111102
output: {
112103
beautify: false,
113104
ascii_only: true

0 commit comments

Comments
 (0)