0

I have a code snippet below

g = function() {
    require(["game"], function(b) {
    ...
    }
}

How would I go about exposing everything within game? I'm using RequireJS if that helps?

If I do If I do window.b= b; and try to access b.functionWithin() I get the error functionWithin not a function

Thanks

1

1 Answer 1

1

Everything exported from that module is assigned to b, in your example.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.