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

Add missing semicolon in build output #40

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

thibaudcolas
Copy link

Disclaimer: this is probably one of the worst possible fixes, but it does the job.

There is a bug / misleading feature in the smoosh tool, which removes the semicolon at the end of the compressed JavaScript output. This is perfectly fine when the compressed file (here, ready.min.js) is used as is, but it can break the code if the file is concatenated to other JS code.

Here is a fiddle which demonstrates the issue and the fix. This should be directly fixed in smoosh, so:

  • I submitted a PR to fat/smoosh, with a fix directly taken from Uglify's code (which switched to adding the semicolon some time ago, but not in smoosh's scenario).
  • Here is another PR for domready. The fix is quite terrible but I'd rather submit those changes over just a simple issue.

Hope you find this useful,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant