Files
yudao-ui-admin-vben/docs/.vitepress/build/dayjs-resolve-hook.mjs
2026-05-18 20:17:35 +08:00

11 lines
344 B
JavaScript

const DAYJS_SUBPATH_RE = /^dayjs\/(plugin|locale)\/([^./]+)$/;
/** @type {import('node:module').ResolveHook} */
export async function resolve(specifier, context, nextResolve) {
const match = specifier.match(DAYJS_SUBPATH_RE);
if (match) {
return nextResolve(`${specifier}.js`, context);
}
return nextResolve(specifier, context);
}