From 6dbf95f527ba673ddc566657eafb64c229ac8b14 Mon Sep 17 00:00:00 2001 From: bluwy Date: Tue, 27 Jun 2023 16:06:14 +0800 Subject: [PATCH] Generate hires sourcemap --- packages/astro/src/vite-plugin-astro-postprocess/index.ts | 2 +- packages/astro/src/vite-plugin-env/index.ts | 2 +- packages/astro/src/vite-plugin-scripts/page-ssr.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/astro/src/vite-plugin-astro-postprocess/index.ts b/packages/astro/src/vite-plugin-astro-postprocess/index.ts index 05895ab627c7..96735f2cb194 100644 --- a/packages/astro/src/vite-plugin-astro-postprocess/index.ts +++ b/packages/astro/src/vite-plugin-astro-postprocess/index.ts @@ -61,7 +61,7 @@ export default function astro(_opts: AstroPluginOptions): Plugin { if (s) { return { code: s.toString(), - map: s.generateMap(), + map: s.generateMap({ hires: true }), }; } }, diff --git a/packages/astro/src/vite-plugin-env/index.ts b/packages/astro/src/vite-plugin-env/index.ts index 1f21696e30e9..8d5a9c1c3df8 100644 --- a/packages/astro/src/vite-plugin-env/index.ts +++ b/packages/astro/src/vite-plugin-env/index.ts @@ -137,7 +137,7 @@ export default function envVitePlugin({ settings }: EnvPluginOptions): vite.Plug if (s) { return { code: s.toString(), - map: s.generateMap(), + map: s.generateMap({ hires: true }), }; } }, diff --git a/packages/astro/src/vite-plugin-scripts/page-ssr.ts b/packages/astro/src/vite-plugin-scripts/page-ssr.ts index 97fdf3b59550..82fc12761f96 100644 --- a/packages/astro/src/vite-plugin-scripts/page-ssr.ts +++ b/packages/astro/src/vite-plugin-scripts/page-ssr.ts @@ -35,7 +35,7 @@ export default function astroScriptsPostPlugin({ return { code: s.toString(), - map: s.generateMap(), + map: s.generateMap({ hires: true }), }; }, };