draggable component for vue, based on Sortable.js (ESM and UMD builds)
npm install vuedraggable-esmA repackaged build of vue.draggable.next, the Vue 3 wrapper for SortableJS.
This version provides fully compatible ESM and UMD builds for modern bundlers like Vite, Rollup, and Webpack 5+.
---
``bash``
npm install vuedraggable-esmor
yarn add vuedraggable-esm
---
`js
import { VueDraggable } from 'vuedraggable-esm'
export default {
components: {
VueDraggable,
},
}
`
The package exports both esm and umd builds:
| Format | Path | Description |
| ------ | -------------------------- | ----------------------------------------------------------- |
| ESM | dist/vuedraggable.js | Recommended for modern toolchains (Vite, Rollup, Webpack 5) |dist/vuedraggable.umd.cjs
| UMD | | For legacy or CDN usage |
---
The original vue.draggable.next package was published with a UMD-only entry point,
which could cause build issues in Vite projects:
```
Uncaught SyntaxError: The requested module 'vue' does not provide an export named 'default'
This package rebuilds it using Vite and Rollup, ensuring proper ESM compatibility and clean tree-shaking.
---
* Vue 3.x
* SortableJS 1.x
* Supports both ESM and UMD usage
---
* Original repository: SortableJS/vue.draggable.next
* NPM package: vuedraggable-esm
---
MIT © SortableJS contributors