Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Keep the order of execution for require calls #43
This turned out to be a problem when I tried importing RxJs, as it depends on one required file being executed before another. This PR will make sure the order is maintained, so it at least fixes some cases.
I’ve also added a test; I always wanted to say I added ‘tests’ but I really couldn’t think of another edge case to test ;)
Relevant issue on other repo cyclejs/cyclejs#212
@eventualbuddha most packages won't do anything but importing in the top of the file, so for them it's enough. Maybe we should even issue a warning when something is being required in the not-top-level? Because that would hoist it to the top of the file, totally losing context :/