amendx / vue-dndrop

:herb: A vue library for drag and drop :sparkles:
https://amendx.github.io/vue-dndrop
MIT License
202 stars 21 forks source link

Vue 3 - "createElement is not a function" #26

Closed Fanna1119 closed 2 years ago

Fanna1119 commented 2 years ago

related to #18 on a new vue 3 project installing yarn add vue-dndrop@next .

import { Container, Draggable } from "vue-dndrop";

vue-dndrop.esm.js:2892 Uncaught TypeError: createElement is not a function

amendx commented 2 years ago

Hi, @Fanna1119 , is your version up to 1.2.1 ? Also, if it is, check out the libs .js file and see if it's according to this commit

Fanna1119 commented 2 years ago

Hi, @Fanna1119 , is your version up to 1.2.1 ? Also, if it is, check out the libs .js file and see if it's according to this commit

I can confirm that my version in my package.json is in fact 1.2.1.

however browsing through the vue-dndrop.esm.js The code does not match the new commits

line 2923

  render: function (createElement) {
    return wrapChild(createElement, this);
  },

where the commit shows https://github.com/amendx/vue-dndrop/blob/f4b5610c24db8c26225c93682a6c72c4f54a3f50/src/Draggable.js#L21

amendx commented 2 years ago

@Fanna1119 you're right! Something got messed up on the rollup. It's fixed on version 1.2.2 safe and sound.

Try to update it and see if it persists.

Fanna1119 commented 2 years ago

@amendx seems to be fixed! thank you for the quick response! And a huge thank for the awesome library!