From c0ffb68e1410c90c935165a984cef02a7b4f1bf6 Mon Sep 17 00:00:00 2001 From: EGOIST <0x142857@gmail.com> Date: Tue, 14 Dec 2021 16:00:21 +0800 Subject: [PATCH] fix: add .map suffix to sourcemap comment --- src/plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugin.ts b/src/plugin.ts index 4b938e64..2237826c 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -187,5 +187,5 @@ const getSourcemapComment = (hasMap: boolean, filepath: string, isCssFile: boole if (!hasMap) return '' const prefix = isCssFile ? '/*' : '//' const suffix = isCssFile ? ' */' : '' - return `${prefix}# sourceMappingURL=${path.basename(filepath)}${suffix}` + return `${prefix}# sourceMappingURL=${path.basename(filepath)}.map${suffix}` }