react-draggable v4.1.0 Release Notes

Release Date: 2019-10-25 // 24 days ago
    • ➕ Add "module" to package.json. There are now three builds:
      • "main": ES5-compatible CJS build, suitable for most use cases with maximum compatibility.
      • For legacy reasons, this has exports of the following shape, which ensures no surprises in CJS or ESM polyfilled environments: js module.exports = Draggable; module.exports.default = Draggable; module.exports.DraggableCore = DraggableCore;
      • "web": Minified UMD bundle exporting to window.ReactDraggable with the same ES compatibility as the "main" build.
      • "module": ES6-compatible build using import/export.

    This should fix issues like while allowing modern bundlers to consume esm modules in the future.

    No compatibility changes are expected.

Previous changes from v4.0.3

    • ➕ Add typings and sourcemap to published npm package.
      • This compresses well so it does not bloat the package by much. Would be nice if npm had another delivery mechanism for optional modes, like web/TS.