Vuepic / vue-datepicker

Datepicker component for Vue 3
https://vue3datepicker.com
MIT License
1.38k stars 137 forks source link

Failed to compile #927

Closed liboub closed 1 week ago

liboub commented 2 weeks ago

bug description

I import the picker like that

import VueDatePicker from "@vuepic/vue-datepicker";
import "@vuepic/vue-datepicker/dist/main.css";

and I got that error


 error  in ./node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js

Module parse failed: Unexpected token (230:37)
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
|   const t = r(e);
|   return t != null && t.$el ? t == null ? void 0 : t.$el : t;
> }, gl = (e) => ({ type: "dot", ...e ?? {} }), Mn = (e) => Array.isArray(e) ? !!e[0] && !!e[1] : !1, Ka = {
|   prop: (e) => `"${e}" prop must be enabled!`,
|   dateArr: (e) => `You need to use array as "model-value" binding in order to support "${e}"`

The application is in vue 2.6 with webpack , the picker require vite ? I had try to install the version 6 and 7 but I still got the same issues.

Jasenkoo commented 1 week ago

It doesn't require Vite but it requires Vue 3. It is also compatible with a vue compat library