Closed kskrlinnorth2 closed 1 year ago
It works if I extract v-model variable to reference, which is weird, because Vue should warn be about it (and it is also much weirder why it works on dev, but not on prod build):
let sortableItems = ref(props.items);
<draggable v-model="sortableItems"></draggable>
It works with
npm run dev
, but it doesn't work withnpm run prod
. This (laravel-mix) is wrapper for webpack (v5.60.0)Using Vue 3.2.41, vuedraggable 4.1.0 and laravel-mix 6.0.49
Step by step scenario
When running npm run dev it works, but using npm run prod it doesn't work.
npm scripts:
Webpack:
Code implementation:
Actual Solution
I can drag item and they reorder visually, but on drop they just reset to starting state and they are not reordered (change event also returns old array, not reordered).
Expected Solution
I expect it to work same as on dev build. Plugin is using classes starting with
sortable-
so I tried to whitelist them (that usually worked for plugins), but no luck.