Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax errors in minified sources #1779

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

Syntax errors in minified sources #1779

mgol opened this issue Oct 21, 2014 · 3 comments

Comments

@mgol
Copy link
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
Copy link
Contributor

I encountered this too.

@dmethvin
Copy link
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
Copy link
Contributor

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

@lock lock bot locked as resolved and limited conversation to collaborators Jun 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants