scriptsharp
scriptsharp copied to clipboard
$exports is not defined
When using only a single [ScriptModule] without referencing a single class, the compiler still does a "return $exports;" without ever defining it. As a result 'Uncaught ReferenceError: $exports is not defined ' is thrown.
I understand that I can just change the ScriptTemplate in the AssemblyInfo, but I'm just thinking, that it would be nice to have a working default behavior :)
I'd suggest a change in the ScriptGenerator.cs [Line 199]:
else
{
_writer.Write("var $exports = null;");
}
Cheers!
- btw. Thanks SO much for Schript# :D -