質問

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.

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top