简体   繁体   English

GWAN正在将jquery.min.js修改为error

[英]GWAN is modifying jquery.min.js to error

I am doing an experimental HTML template wich comes with jquery.min.js file - one of the most popular javascript libraries. 我正在做一个带有jquery.min.js文件的实验性HTML模板 - 一个最流行的JavaScript库。

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: 当我上传并从服务器(GWAN)加载它时,我得到的错误(我认为不是唯一一个)在Chrome中看起来像这样:

Uncaught SyntaxError: Unexpected token { jquery.min.js:3 未捕获的SyntaxError:意外的令牌{jquery.min.js:3

I inspected a bit and realized there is a 我检查了一下,意识到有一个

function $

which was turned into 变成了

function$

by GWan. 由GWan。 The space removed is causing an error in Chrome, Firefox and Safari. 删除的空间导致Chrome,Firefox和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. 我没有测试过其他浏览器,但我的IDE也报告了从GWAN版本的JS文件下载的语法错误。

I have also tried uploading the files to another server (Apache) and no problem there. 我也尝试将文件上传到另一台服务器(Apache),没问题。 The js file was not modified... js文件未被修改...

Any clues on how to get over this? 关于如何克服这个问题的任何线索? I suppose there is a bug in javascript on-the-fly optimization of GWan? 我想在GWan的javascript即时优化中存在一个错误?

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: 这是一个已知问题,它将在下一个版本中修复(很快)您将能够直接从G-WAN v4.10 +中的init.c脚本禁用缩小,这样:

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. 你只需要等待几天就可以获得新的v5版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM