Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$exports is not defined #389

Open
Sam7 opened this issue Jul 11, 2013 · 0 comments
Open

$exports is not defined #389

Sam7 opened this issue Jul 11, 2013 · 0 comments

Comments

@Sam7
Copy link

Sam7 commented Jul 11, 2013

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 -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant