GWAN正在将jquery.min.js修改为错误 [英] GWAN is modifying jquery.min.js to error
问题描述
我正在做一个实验性的HTML模板,它带有jquery.min.js文件 - 最流行的JavaScript库之一。
I am doing an experimental HTML template wich comes with jquery.min.js file - one of the most popular javascript libraries.
当我从我的本地硬盘驱动器工作正常。
当我上传并从服务器(GWAN)加载它时,我在Chrome中看到错误(我认为这不是唯一的错误):
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:
未捕获的SyntaxError:意外的标记{jquery.min.js:3
Uncaught SyntaxError: Unexpected token { jquery.min.js:3
我检查了一下并意识到存在a
I inspected a bit and realized there is a
function $
变成了
which was turned into
function$
由GWan。删除的空间在Chrome,Firefox和Safari中导致错误。我还没有测试其他浏览器,但我的IDE也报告从JS文件的GWAN版本下载的语法错误。
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.
我也尝试将文件上传到另一个服务器(Apache)并没有问题。 js文件没有修改...
I have also tried uploading the files to another server (Apache) and no problem there. The js file was not modified...
关于如何克服这个问题的任何线索?我想在JavaScript中对GWan的动态优化存在一个错误?
Any clues on how to get over this? I suppose there is a bug in javascript on-the-fly optimization of GWan?
谢谢。
Thanks.
推荐答案
这是一个已知问题,将在下一个版本中解决(即将推出)
您可以直接从 init.c <
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");
}
新v5版本只需要等待几天。
You just have to wait for few days for the new v5 release.
这篇关于GWAN正在将jquery.min.js修改为错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!