Skip to content
  • Mike Bostock's avatar
    Fix #2755. · 40951a7a
    Mike Bostock authored
    In Node, we now use a CommonJS build with external dependencies, rather than
    inlining the dependencies as is done with the UMD bundle. Thus, Node now
    automatically defers to the dependent’s main entry; in the case of d3-request,
    that means it inherits the XMLHttpRequest polyfill.
    
    A slight wrinkle is that Rollup doesn’t correctly re-export the d3.event symbol
    if the dependencies are not inlined. However, this is fixed by patching the
    CommonJS build and replacing the event export with a getter.
    
    This commit also removes the rollup-plugin-json dependency, and instead
    generates a tiny ES6 module to export the version field from package.json.
    40951a7a