i use
vue-datepicker-next: 1.0.3
vue: 3.3.4
vite: 4.3.9
the runtime error occurs only in production mode :
npm run build -> "build": "run-p type-check build-only",
when i deploy the "dist" folder to the production machine, then
this is error occurs in the browser console
TypeError: r.default.locale is not a function
the line " return r.default.locale("de", l)," causes this error
(function(t, e) {
(function(n, a) {
t.exports = a(Da)
}
)(It, function(n) {
function a(s) {
return s && typeof s == "object" && "default"in s ? s : {
default: s
}
}
var r = a(n)
, o = {
months: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"],
monthsShort: ["Jan", "Feb", "März", "Apr", "Mai", "Juni", "Juli", "Aug", "Sep", "Okt", "Nov", "Dez"],
weekdays: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"],
weekdaysShort: ["So.", "Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa."],
weekdaysMin: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
firstDayOfWeek: 1,
firstWeekContainsDate: 4
};
const l = {
formatLocale: o,
yearFormat: "YYYY",
monthFormat: "MMM",
monthBeforeYear: !0
};
return r.default.locale("de", l),
l
})
}
)(wa);
export {ya as i};
i use vue-datepicker-next: 1.0.3 vue: 3.3.4 vite: 4.3.9
the runtime error occurs only in production mode : npm run build -> "build": "run-p type-check build-only",
when i deploy the "dist" folder to the production machine, then this is error occurs in the browser console TypeError: r.default.locale is not a function
the line " return r.default.locale("de", l)," causes this error
here my code snippet: