GWAN is modifying jquery.min.js to error

这一生的挚爱 提交于 2019-12-13 14:29:35

问题


I am doing an experimental HTML template wich comes with jquery.min.js file - one of the most popular javascript libraries.

When I load the template from my local hard drive it works fine. When I upload it and load it from server (GWAN) I get error (I think is not the only one) in Chrome looks like this:

Uncaught SyntaxError: Unexpected token { jquery.min.js:3

I inspected a bit and realized there is a

function $

which was turned into

function$

by GWan. The space removed is causing an error in Chrome, Firefox and Safari. I haven't tested other browsers but my IDE also reports a syntax error in the downloaded from GWAN version of the JS file.

I have also tried uploading the files to another server (Apache) and no problem there. The js file was not modified...

Any clues on how to get over this? I suppose there is a bug in javascript on-the-fly optimization of GWan?

Thanks.


回答1:


It's a known issue and it will be fixed in next release (soon) You'll be able to disable minifying directly from a init.c script in G-WAN v4.10+, this way:

u8 *www_mini = (u8*)get_env(argv, USE_MINIFYING);
if(www_mini)
{
  *www_mini = 0;
  puts("> disable minifying");
}

You just have to wait for few days for the new v5 release.



来源:https://stackoverflow.com/questions/21468208/gwan-is-modifying-jquery-min-js-to-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!