Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

Keep the order of execution for require calls #43

Merged
merged 2 commits into from
Jul 20, 2016
Merged

Keep the order of execution for require calls #43

merged 2 commits into from
Jul 20, 2016

Conversation

dralletje
Copy link
Contributor

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

@dralletje
Copy link
Contributor Author

@Victorystick Anything on this though? As this is necessary for browserify/webpack packages as well :/

@eventualbuddha
Copy link
Contributor

So this will cause rollup to add imports in the source order of the requires. That isn't guaranteed to be the actual order, but it is better than it was before so 👍

@dralletje
Copy link
Contributor Author

@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 :/

@ulrik59
Copy link

ulrik59 commented Apr 5, 2016

@dralletje Could you resolve conflicts so it can be merged ? I also need this evolution in order to use Bootstrap. Great work by the way !

@dralletje
Copy link
Contributor Author

Sorry it took so long, but I rebased, hahaha :-)

@TrySound
Copy link
Member

Thanks!

@TrySound TrySound closed this Jul 20, 2016
@TrySound TrySound reopened this Jul 20, 2016
@TrySound TrySound merged commit 8c9d77f into rollup:master Jul 20, 2016
@TrySound
Copy link
Member

Sorry :)

@dralletje
Copy link
Contributor Author

Hahaha, thanks :D!

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

Successfully merging this pull request may close these issues.

4 participants