Skip to content

Commit 866f4da

Browse files
authored
Merge pull request #2789 from plotly/fixup-mapbox-minification
Set minify option 'compress' to false to fix mapbox-gl minification
2 parents 7e1c98c + 048a3d6 commit 866f4da

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

tasks/bundle.js

-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ tasks.push(function(cb) {
5151
standalone: 'Plotly',
5252
debug: DEV,
5353
compressAttrs: true,
54-
packFlat: true,
5554
pathToMinBundle: constants.pathToPlotlyDistMin
5655
}, cb);
5756
});
@@ -68,7 +67,6 @@ tasks.push(function(cb) {
6867
_bundle(constants.pathToPlotlyIndex, constants.pathToPlotlyDistWithMeta, {
6968
standalone: 'Plotly',
7069
debug: DEV,
71-
packFlat: true
7270
}, function() {
7371
makeSchema(constants.pathToPlotlyDistWithMeta, constants.pathToSchema)();
7472
cb();
@@ -82,7 +80,6 @@ constants.partialBundlePaths.forEach(function(pathObj) {
8280
standalone: 'Plotly',
8381
debug: DEV,
8482
compressAttrs: true,
85-
packFlat: true,
8683
pathToMinBundle: pathObj.distMin
8784
}, cb);
8885
});

tasks/cibundle.js

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ _bundle(constants.pathToPlotlyIndex, constants.pathToPlotlyBuild, {
1717
standalone: 'Plotly',
1818
debug: true,
1919
compressAttrs: true,
20-
packFlat: true,
2120
pathToMinBundle: constants.pathToPlotlyDistMin
2221
});
2322

tasks/util/constants.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,14 @@ module.exports = {
8686

8787
uglifyOptions: {
8888
mangle: true,
89-
compress: {
90-
warnings: false
91-
},
89+
// the compress flag break mapbox-gl,
90+
// TODO find a way to only skip compression on mapbox-gl files
91+
compress: false,
9292
output: {
9393
beautify: false,
9494
ascii_only: true
9595
},
96+
9697
sourceMap: false
9798
},
9899

0 commit comments

Comments
 (0)