Skip to content

Require unminified mapbox-gl for unminified bundles and improve compression of minified bundles #5449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/plots/mapbox/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

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

var Lib = require('../../lib');
var strTranslate = Lib.strTranslate;
Expand Down
2 changes: 1 addition & 1 deletion src/plots/mapbox/mapbox.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

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

var Lib = require('../../lib');
var geoUtils = require('../../lib/geo_location_utils');
Expand Down
9 changes: 0 additions & 9 deletions tasks/util/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,6 @@ module.exports = {
uglifyOptions: {
ecma: 5,
mangle: true,
compress: {
// see full list of compress option
// https://github.com/fabiosantoscode/terser#compress-options
//
// need to turn off 'typeofs' to make mapbox-gl work in
// minified bundles, for more info see:
// https://github.com/plotly/plotly.js/issues/2787
typeofs: false
},
output: {
beautify: false,
ascii_only: true
Expand Down