From 1e9d1d1fce2adb861e6ca7d55a601e4e28ec314a Mon Sep 17 00:00:00 2001 From: Dunqing Date: Sat, 19 Aug 2023 23:16:40 +0800 Subject: [PATCH] fix(astro): astro integration `HMR` not work (#2997) --- packages/astro/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/index.ts b/packages/astro/src/index.ts index 4c7d37af15..6021881ecf 100644 --- a/packages/astro/src/index.ts +++ b/packages/astro/src/index.ts @@ -34,7 +34,7 @@ function AstroVitePlugin(options: AstroVitePluginOptions): Plugin { if (RESOLVED_ID_RE.test(id)) { // https://github.com/withastro/astro/blob/087270c61fd5c91ddd37db5c8fd93a8a0ef41f94/packages/astro/src/core/util.ts#L91-L93 // Align data-astro-dev-id with data-vite-dev-id to fix https://github.com/unocss/unocss/issues/2513 - return join(root, id) + return this.resolve(join(root, id), importer, { skipSelf: true }) } if (id === UNO_INJECT_ID) {