Syntax errors in minified sources #1779

Closed
mgol opened this Issue Oct 21, 2014 · 3 comments

Projects

None yet

3 participants

@mgol
Member
mgol commented Oct 21, 2014

Originally reported by Bergi at: http://bugs.jquery.com/ticket/15179

Both current versions ( 2.1.1,  1.11.1) have syntactic errors in their minified distribution files which prevents compilation in strict mode. Try to execute them when prefixed by "use strict":

Syntax error: FunctionDeclaration in Statement context

(If you're not sure what that means, have a look at  this StackOverflow question).

I'm not familiar with the build process, this might either be a bug in the minifier, or wrong usage of the minifier, or some problems with the custom build process of jQuery. If it's not your fault, please file an upstream bug with the used minifier.

@silverwind
Contributor

I encountered this too.

@dmethvin
Member

jQuery isn't meant to be run with "use strict" in effect. See the comment at the top of the unminified file for the reason, or look at http://bugs.jquery.com/ticket/13335 for more information. You are not gaining anything by attempting to force jQuery into strict mode against its will, doing so prevents interoperability with any third-party libraries that are not use-strict compatible.

@silverwind
Contributor

Thanks for the explanation! I guess you can close this issue as wontfix.

@dmethvin dmethvin closed this Oct 24, 2014
@andyli andyli referenced this issue in HaxeFoundation/haxe Jul 17, 2015
Merged

Allow to specify includeFile position. #4419

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment