Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

May be a dumb question but does this actually run on vue2? #16

Open
vikingvynotking opened this issue Jun 8, 2022 · 1 comment
Open

Comments

@vikingvynotking
Copy link

I have a client with a stable vue2 site, no plans to move to vue3, and now the client wishes to add some drag-n-drop functionality. I've been researching all the various vue-drag packages and this seemed like a decent one to explore. However despite all attempts it seems unusable with vue2, specifically vue 2.6.14.

Here's a summary of the various errors I'm seeing:

let VueDragula = require('vue2-dragula')

 results in:

Uncaught TypeError: __webpack_require__(...) is not a function

Well, ok, maybe there's something weird about my setup. Let's try import:

import VueDragula from 'vue2-dragula'
Vue.use(VueDragula)

results in

[Vue warn]: Vue is a constructor and should be called with the `new` keyword [[email protected]:634:17](https://unpkg.com/[email protected])
Uncaught TypeError: this is undefined

so that doesn't work either.

Note: I'm not asking for help troubleshooting my setup, or workarounds to allow the plugin to work, simply questioning the current support for this package running on vue 2.6. Even the linked demo (https://jsfiddle.net/av1jLfn8/) is non-functional.

@kristianmandrup
Copy link
Owner

I haven't tested this library since the earlier versions of Vue 2.

I would recommend cloning it and working from there, debugging the "add plugin" part with your version of Vue and comparing with how other plugins do it.

How and why I initially created this plugin, originally a fork to overcome some limitations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants