Skip to content

v3.4.0

Compare
Choose a tag to compare
@goto-bus-stop goto-bus-stop released this 05 May 15:48
ba43bf0
  • Sort dependencies by source order location, now execution order should be much more consistent between Node.js and browser-pack-flat
  • Prevent inlining conditional and lazy require() calls:
    // this no longer evaluates 'a' if condition is false
    if (condition) require('a')
    
    // this now evaluates 'b' first, then console.log(), and then 'c' once lazy() is called,
    // instead of evaluating 'b' and 'c' before entering the module
    function lazy () { require('c') }
    require('b')
    console.log()
    lazy()
    
    // NOTE this *will* still cause out-of-order evaluation! 'b' will be evaluated before
    // console.log() is called.
    console.log()
    require('b')