Maplibre latest version combination + minification with terser break the code #4923
Replies: 5 comments 1 reply
-
It is not clear what the problem is, I'm not very familiar with terser, but I can't think of a major change in the code that could've break stuff that worked... |
Beta Was this translation helpful? Give feedback.
-
Now I combine
in order to load everything async. After combining everything is fine. When instead doing the minification process on the combined file with terser and gulp the maplibre script stop working without providing any error on the browser side. Have no more info on why, but I tested combining and minifing
and then injecting on top the maplibre-gl.js file to exclude issue on myfile1 and 2 in order to isolate the issue. So the issue is in the minification process of the maplibre-gl.js. Can it be due to minifing an already minified file? |
Beta Was this translation helpful? Give feedback.
-
What is the last version that worked? What commandline are you running? What if you don't add any code and just try the maplibre-gl.js file? What about using the -dev.js version as it is not minified? |
Beta Was this translation helpful? Give feedback.
-
The latest working versione is MapLibre GL JS is licensed under the 3-Clause BSD License. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v1.15.2/LICENSE.txt Already tested -dev and -unminified The Gulp task is do the following
|
Beta Was this translation helpful? Give feedback.
-
This is a version from 3 year ago. |
Beta Was this translation helpful? Give feedback.
-
I tested various configuration of terser in order to prevent maplibre breaking, but unfortunately not figuring out.
Is there some suggestion of terser option to prevent maplibre latest version from breaking?
In dev mode where we don't minify the code everything works with maplibre-gl combined with other files, but in production mode after the minification everything stop working without any error in console so it's very difficult to debug.
If someone know of the terser configuration in order to prevent breaking maplibre.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions