SortableJS / vue.draggable.next

Vue 3 compatible drag-and-drop component based on Sortable.js
https://sortablejs.github.io/vue.draggable.next/#/simple
MIT License
3.91k stars 531 forks source link

when the build esm format file, Vue will be packaged as default export #273

Open ShetePro opened 2 weeks ago

ShetePro commented 2 weeks ago

First check https://github.com/SortableJS/Vue.Draggable/blob/master/CONTRIBUTING.md

Step by step scenario

When I use the plugin to package in esm format,The packaging result will contain import require$$0, { ... } from "vue"; Vue3x has no default export,This will cause a runtime error

Actual Solution

image

Expected Solution

not error

ShetePro commented 2 weeks ago

If use umd file, There will not be this problem.

ShetePro commented 2 weeks ago
image

Setting vue as an external dependency can solve this problem, but I don't know if there will be any other impact?