Closed alessandrod closed 7 years ago
I think the bug boils down to this:
alessandro@june:/tmp$ cat a.js
console.log("this === global", this === global);
(function() {
console.log("this === global", this === global);
})()
alessandro@june:/tmp$ node a.js
this === global false
this === global true
Looking at the output of :optimizations :advanced
, it seems (the output is really horrible) like Google Closure expects this
to be the global
object, which without :output-wrapper true
is instead {}
.
Meh.
Awesome, thanks - I wasn't aware you were using the Serverless template.
When invoking the clojurescript compiler directly with
:optimizations :advanced
, also set:output-wrapper true
. lein-cljsbuild does this too, and without it^:export
ed symbols don't get exported correctly.See #78.