PDA

View Full Version : Leaflet library breaks on production build



tschortsch
18 Nov 2012, 4:49 AM
Hello everyone

I'm trying to build my Sencha Touch application which is using the Leaflet Library (http://leafletjs.com/). As soon as I'm doing a production build with Sencha Cmd 3.0.0.250 the L variable gets overwritten by the compressed microloader in the index.html file.

L variable in index.html:

function L(a,b){var c=k.createElement("iframe");m.push({iframe:c,callback:b});c.src=a+".html";c.style.cssText=

When I manually disable the ClosureCompressor in the [SenchaCmd]/plugins/touch/current/app-build.js file on line 355


//compressor = new ClosureCompressor();

the microloader doesn't get compressed and my app works again.

Is there a way to tell the compressor not to use the L variable?

Thanks in advance!
tschortsch

rbruno
31 Jan 2013, 5:55 AM
I use SenchaTouch 2.1 and leaflet 0.4, I did this and my app not run.

What happened with this problems, the microloader still overwrite the leaflet instance in production build?

tschortsch
31 Jan 2013, 6:13 AM
I didn't find a proper solution for this so far. I'm still using the workaround I posted above.