Don't try to uglify on the client

Follow-up to 36ff10c08.

Note that 696ce39c10 made tests fail, because it used minifiers on the
client for the first time, which hit this edge case.

If you are hitting this issue in your own app because you are using
SpacebarsCompiler on the client and loading minifiers, you can work
around it for now by putting this somewhere:

   Package.minifiers.UglifyJSMinify = function (code) {
     return { code: code };
   };
This commit is contained in:
David Glasser
2015-03-27 12:33:07 -07:00
parent b439bca263
commit 8cbaf4e3e1

View File

@@ -90,7 +90,7 @@ SpacebarsCompiler.codeGen = function (parseTree, options) {
};
SpacebarsCompiler._beautify = function (code) {
if (Package.minifiers) {
if (Package.minifiers && Package.minifiers.UglifyJSMinify) {
var result = Package.minifiers.UglifyJSMinify(
code,
{ fromString: true,