It seems that setting when: 'before' in conditional modules is being ignored. See http://jsbin.com/tidicega/2/edit.
/cc @ezequiel @caridy
This is a regression in 3.15.0.
for reference, PR #1606 is the one with the optimization for 3.15.0.
I think it has to do with @ezequiel's patch looking directly into moduleInfo[foo].requires instead of using loader._requires(a, b). In fact, loader._requires() seems to be dead code now.
I don't think PR #1606 does anything with before and after, in fact I don't see those keys in the diff.
loader._requires() checks after explicitly. I'm not finding a reference to before, but it's the only change to Loader that modifies the sorting of dependencies in this release.
Thanks for beating me to the punch on reporting this bug. I wanted to do a bit more investigation before sinking ship.
Yes, _requires is dead code. I did not want to remove it just yet, as I do not know if anyone is currently using it-- though, I seriously doubt it.
This has been fixed in #1743.