From 855790c3f0bdb2c30195ecc17916133608785d72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Sun, 27 Oct 2024 11:32:16 +0900 Subject: [PATCH] fix --- src/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 4db2213..022e396 100644 --- a/src/index.ts +++ b/src/index.ts @@ -80,8 +80,9 @@ export default createUnplugin((options = {}) => { build.onLoad( { filter: new RegExp(`^${ID_PREFIX}`), namespace: name }, async ({ path }) => { - // eslint-disable-next-line unused-imports/no-unused-vars - const [_, src] = path.replace(ID_PREFIX, '').split(':', 2) + let [, src] = path.replace(ID_PREFIX, '').split(':', 2) + src = src.replaceAll(DRIVER_DIVIDER_REGEXP, ':') + return { contents: await load(path), resolveDir: dirname(src),