If the require() module name is dynamically determined with a ternary, which has two strings, requiring both modules first, to make sure they are both available.
Somehow wrapup already fixes this almost, but when outputing it as AMD, and using requirejs, and one of the modules is not yet loaded yet, then requirejs does not statically load both modules upfront, so it will require(x?'a':'b') while a or b are not defined yet, resulting in an error. If prefixing require('a'); require('b') requirejs will make sure both modules are loaded, before doing the require(x?'a':'b');.