Skip to content

Commit

Permalink
Append a semicolon after minifying with UglifyJS.
Browse files Browse the repository at this point in the history
  • Loading branch information
scottgonzalez committed Apr 17, 2012
1 parent d4c98ad commit 6fc5608
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tasks/min.js
Expand Up @@ -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);
Expand Down

0 comments on commit 6fc5608

Please sign in to comment.