credred / vue-drag-select

Drag select component for Vue3
https://credred.github.io/vue-drag-select/
48 stars 5 forks source link

Unexpected token #24

Closed paul1982 closed 10 months ago

paul1982 commented 1 year ago

if i add the module to my main.js file, I get this error:

ERROR Failed to compile with 1 error 16:53:38

error in ./node_modules/@coleqiu/vue-drag-select/dist/vue-drag-select.es.js

Module parse failed: Unexpected token (36:31) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | } | function oe(t, e = {}) {

const l = e.draggingElement ?? window, o = (v) => v.isPrimary ? e.pointerTypes ? e.pointerTypes.includes(v.pointerType) : !0 : !1, n = (v) => { | c(e.preventDefault) && v.preventDefault(); | }, i = (v) => {

@ ./src/main.js 31:0-53 59:16-29 @ multi (webpack)-dev-server/client?http://192.168.17.220:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

Is this a error of the module, or a error of my webpack? I hope you can give me a push in the right direction

credred commented 1 year ago

I have no problem using webpack, here is an example.

https://stackblitz.com/edit/webpack-webpack-js-org-pnzxqy?file=README.md

Can you provide a reproduction