summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/astro/src/core/errors/overlay.ts14
-rw-r--r--packages/astro/src/vite-plugin-astro/compile.ts1
2 files changed, 9 insertions, 6 deletions
diff --git a/packages/astro/src/core/errors/overlay.ts b/packages/astro/src/core/errors/overlay.ts
index 8eb297ea0..378e05f83 100644
--- a/packages/astro/src/core/errors/overlay.ts
+++ b/packages/astro/src/core/errors/overlay.ts
@@ -524,11 +524,15 @@ class ErrorOverlay extends HTMLElement {
if (html) {
// Automatically detect links
- text = text.split(' ').map(v => {
- if (!v.startsWith('https://')) return v;
- if (v.endsWith('.')) return `<a target="_blank" href="${v.slice(0, -1)}">${v.slice(0, -1)}</a>.`
- return `<a target="_blank" href="${v}">${v}</a>`
- }).join(' ');
+ text = text
+ .split(' ')
+ .map((v) => {
+ if (!v.startsWith('https://')) return v;
+ if (v.endsWith('.'))
+ return `<a target="_blank" href="${v.slice(0, -1)}">${v.slice(0, -1)}</a>.`;
+ return `<a target="_blank" href="${v}">${v}</a>`;
+ })
+ .join(' ');
}
if (el) {
diff --git a/packages/astro/src/vite-plugin-astro/compile.ts b/packages/astro/src/vite-plugin-astro/compile.ts
index 929dac2ca..b3c85373b 100644
--- a/packages/astro/src/vite-plugin-astro/compile.ts
+++ b/packages/astro/src/vite-plugin-astro/compile.ts
@@ -1,4 +1,3 @@
-import { fileURLToPath } from 'url';
import { ESBuildTransformResult, transformWithEsbuild } from 'vite';
import { AstroConfig } from '../@types/astro';
import { cachedCompilation, CompileProps, CompileResult } from '../core/compile/index.js';