You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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');.
The text was updated successfully, but these errors were encountered:
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')
whilea
orb
are not defined yet, resulting in an error. If prefixingrequire('a'); require('b')
requirejs will make sure both modules are loaded, before doing therequire(x?'a':'b');
.The text was updated successfully, but these errors were encountered: