From 0a112e1f564242280d8bb3f142b2a205d25832e8 Mon Sep 17 00:00:00 2001 From: matthewp Date: Fri, 28 Jan 2022 22:11:55 +0000 Subject: [PATCH] [ci] yarn format --- packages/astro/src/vite-plugin-astro/compile.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/astro/src/vite-plugin-astro/compile.ts b/packages/astro/src/vite-plugin-astro/compile.ts index be77b91c7..2059a6680 100644 --- a/packages/astro/src/vite-plugin-astro/compile.ts +++ b/packages/astro/src/vite-plugin-astro/compile.ts @@ -55,7 +55,7 @@ async function compile(config: AstroConfig, filename: string, source: string, vi let prefix = ''; // In the static build, strip away at-imports so that they can be resolved // by the pseudo-module that gets created. - if(config.buildOptions.experimentalStaticBuild) { + if (config.buildOptions.experimentalStaticBuild) { value = value.replace(/(?:@import)\s(?:url\()?\s?["\'](.*?)["\']\s?\)?(?:[^;]*);?/gi, (match) => { prefix += match; // Replace with an empty string of the same length, to preserve source maps. @@ -79,7 +79,7 @@ async function compile(config: AstroConfig, filename: string, source: string, vi map = result.map.toString(); } } - const code = prefix += result.code; + const code = (prefix += result.code); return { code, map }; } catch (err) { // save error to throw in plugin context