Keep the order of execution for require calls#43
Keep the order of execution for require calls#43TrySound merged 2 commits intorollup:masterfrom dralletje:master
Conversation
|
@Victorystick Anything on this though? As this is necessary for browserify/webpack packages as well :/ |
|
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 👍 |
|
@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 :/ |
|
@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 ! |
# Conflicts: # test/test.js
|
Sorry it took so long, but I rebased, hahaha :-) |
|
Thanks! |
|
Sorry :) |
|
Hahaha, thanks :D! |
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