Debian - 所有浏览器jquery压缩打破所有js,但未压缩的工作正常 [英] Debian - all browsers jquery compressed breaks all js, but uncompressed works fine

查看:225
本文介绍了Debian - 所有浏览器jquery压缩打破所有js,但未压缩的工作正常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在debian linux中使用浏览器(如opera或chome)时,页面会加载js错误。这不会在任何其他浏览器中发生,实际上我甚至无法再现它,但另一个用户可以在他的系统的几乎每个浏览器中重现它。

In debian linux when using a browser such as opera or chome the page loads with a js error. This does not happen in any other browser and in fact I cannot even reproduce it, but another user can reproduce it in almost every browser on his system.

错误是:

[12/07/11 19:08:22] JavaScript - http://demo.phppointofsalestaging.com/js/jquery-1.6.1.min.js
Linked script compilation
Syntax error at line 2 while loading:
,"*":"*/**/*;q=0.01":""):d.accepts["*"])
--------------------^
expected '}', got ':'
[12/07/11 19:08:23] JavaScript - http://demo.phppointofsalestaging.com/index.php
Inline script thread
Uncaught exception: ReferenceError: Undefined variable: $
Error thrown at line 1, column 0 in http://demo.phppointofsalestaging.com/index.php:
    $(document).ready(function()
[12/07/11 19:08:33] JavaScript - http://demo.phppointofsalestaging.com/js/jquery-1.6.1.min.js
Linked script compilation
Syntax error at line 2 while loading:
,"*":"*/**/*;q=0.01":""):d.accepts["*"])
--------------------^

只有在jquery被缩小时才会发生,否则不会发生。这是头脑浮躁。

This only happens when jquery is minified, it doesn't happen otherwise. This is mind boggiling.

推荐答案

只是一个单挑...

http://bugs.jquery.com/ticket/10153#comment:2


您的分页符错误地将QUOTED字符串中的/ *视为
是多行JavaScript注释的开头。请勿打破
HAPPY FUN JQUERY与破碎的碎化机;而是使用code.jquery.com或
CDN中的
正确的最小化版本。

Your minifier is incorrectly seeing the /* inside a QUOTED string as the beginning of a multi-line Javascript comment. PLEASE DO NOT TAUNT HAPPY FUN JQUERY with a broken minifier; instead use the properly-minified version available at code.jquery.com or any of the CDNs.




  • jQuery Bugs团队

  • 这篇关于Debian - 所有浏览器jquery压缩打破所有js,但未压缩的工作正常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆