[bug] Doesn't work with Sortablejs 1.13.0 or 1.10.2
This package doesn't function properly when one of these to versions is installed with it. In specific the swap doesn't work. The only way it works if version 1.12.0 is installed. Since 1.12.0 is deprecated on a fresh install the swap and the drag & drop doesn't function as it should.
I figured out, that in sortable.esm.js (it is used by Webpack bundler because it's written in module section) Swap plugin is not mounted.
So you have to add the following string in some of your index files:
import Sortable, { Swap } from 'sortablejs';
Sortable.mount(new Swap());
It doesn't solve all issues, but may be helpful.
I figured out, that in
sortable.esm.js(it is used by Webpack bundler because it's written inmodulesection) Swap plugin is not mounted.So you have to add the following string in some of your index files:
import Sortable, { Swap } from 'sortablejs'; Sortable.mount(new Swap());It doesn't solve all issues, but may be helpful.
Ah, so thats why it doesnt work with the newer version or the older one. Unfortunately mounting doesn’t work for my usecase. I run next and i get webpack module error when i try to mount Swap. I worked around my issue by using yarn and installing v1.12. Alternatively a package lock with v1.12