You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have defined a plugin to add a function to the $dayjs() object:
// plugins/dayjs.js
export default (option, dayjsClass) => {
dayjsClass.prototype.addWeekdays = function (numDays) {
const direction = numDays < 0 ? -1 : 1
let date = this
while (numDays !== 0) {
date = date.addDays(direction)
if (date.day() !== 0 && date.day() !== 6) {
numDays -= direction
}
}
return date
}
}
However, when using the plugins settingplugins: ['~/plugins/dayjs.js'] the module cannot be found because it looks within 'dayjs/plugin/~/plugins/dayjs`
The text was updated successfully, but these errors were encountered:
I have defined a plugin to add a function to the $dayjs() object:
However, when using the plugins setting
plugins: ['~/plugins/dayjs.js']
the module cannot be found because it looks within 'dayjs/plugin/~/plugins/dayjs`The text was updated successfully, but these errors were encountered: