Closed sgrossberndt closed 4 years ago
I am also seeing this message when I run locally with Webpack. It seems that the webpack loads different js modules then the IIS machine. I am using 2.16
Corrected in version 2.23.2
For me I solved ordering the dependencies in typical use
<script src="https://cdn.jsdelivr.net/npm/sortablejs@1.8.4/Sortable.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Vue.Draggable/2.20.0/vuedraggable.umd.min.js"></script>
Sortable first, and vuedraggable second
The commit 7d4db6f324c54ba13af6c80390fca6e6a943d21c breaks vue-draggable for client usage. Generated code from this in
vuedraggable.umd.js
isvar Sortable = __webpack_require__("a352").default;
which leads to[Vue warn]: Error in mounted hook: "TypeError: Sortable is not a constructor"
(or[Vue warn]: Error in mounted hook: "TypeError: u is not a constructor"
when usingvuedraggable.umd.min.js
).The problem seems to be that
default
is not defined -__webpack_require__("a352")
already contains theSortable
object. Thus changing the line tovar Sortable = __webpack_require__("a352");
fixes the issue.