Files
huachuang/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/docs/.vitepress/build/dayjs-resolve-hook.mjs
zhouz 03efb36f84
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
init:前后端代码
2026-07-08 16:07:29 +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);
}