Permalink
Browse files

Append a semicolon after minifying with UglifyJS.

  • Loading branch information...
scottgonzalez committed Apr 17, 2012
1 parent d4c98ad commit 6fc560817b97579042c8045a60b4a54d5f179f3e
Showing with 4 additions and 1 deletion.
  1. +4 −1 tasks/min.js
View
@@ -64,7 +64,10 @@ module.exports = function(grunt) {
src = pro.gen_code(ast, options.codegen || {});
// Success!
grunt.verbose.ok();
- return src;
+ // UglifyJS adds a trailing semicolon only when run as a binary.
+ // So we manually add the trailing semicolon when using it as a module.
+ // https://github.com/mishoo/UglifyJS/issues/126
+ return src + ';';
} catch(e) {
// Something went wrong.
grunt.verbose.or.write(msg);

0 comments on commit 6fc5608

Please sign in to comment.