From 76f6643dddb9343218020cf7585be92a1fe45d3a Mon Sep 17 00:00:00 2001 From: natemoo-re Date: Sat, 2 Apr 2022 17:35:42 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/vite-plugin-astro/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/astro/src/vite-plugin-astro/index.ts b/packages/astro/src/vite-plugin-astro/index.ts index 7d5839e48..8aff612ba 100644 --- a/packages/astro/src/vite-plugin-astro/index.ts +++ b/packages/astro/src/vite-plugin-astro/index.ts @@ -63,7 +63,7 @@ export default function astro({ config, logging }: AstroPluginOptions): vite.Plu const { query: fromQuery, filename } = parseAstroRequest(from); if (fromQuery.astro && isRelativePath(id) && fromQuery.type === 'script') { const resolvedURL = new URL(id, `file://${filename}`); - const resolved = resolvedURL.pathname + const resolved = resolvedURL.pathname; if (isBrowserPath(resolved)) { return relativeToRoot(resolved + resolvedURL.search); } @@ -131,7 +131,9 @@ export default function astro({ config, logging }: AstroPluginOptions): vite.Plu const src = hoistedScript.src!; if (src.startsWith('/') && !isBrowserPath(src)) { const publicDir = config.public.pathname.replace(/\/$/, '').split('/').pop() + '/'; - throw new Error(`\n\n