#782·framework

leaflet bundle cannot be loaded correctly when minified

Author: hallloCreated May 29, 2017Updated May 25, 2022
Labelsquestion

I'm submitting a bug report

  • Library Version: 1.1.2

  • Operating System: Windows 10

  • Node Version: 7.6.0

  • NPM Version: 4.1.2

  • Aurelia CLI OR JSPM OR Webpack AND Version JSPM 0.16.53

  • Browser: Chrome 58 | Edge 38

  • Language: TypeScript 2.3.3

Current behavior: I am using leaflet.js and want to bundle my application. When I have the aurelia-bundler minify the leaflet bundle, the browsers seem to not be able to read it correctly:

Error loading http://127.0.0.1:8080/jspm_packages/github/Leaflet/[email protected]/dist/leaflet-src.js as "github:Leaflet/[email protected]/dist/leaflet-src.js" from http://127.0.0.1:8080/jspm_packages/github/Leaflet/[email protected]

Expected/desired behavior: If I don't let the aurelia-bundler minify the bundle, everything seems to work perfectly. Here is my code: https://github.com/halllo/AureliaTutorial/blob/master/leaflet/build/bundles.js#L50

Is there anything I can do in order to correctly have the bundle minified or is this a todo on leaflet.js's part?