Skip to content

Commit 9ae7fe6

Browse files
authored
fix: ignore directive sourcemap error (#231)
1 parent 3029ffb commit 9ae7fe6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,14 @@ const silenceUseClientWarning = (userConfig: UserConfig): BuildOptions => ({
278278
) {
279279
return;
280280
}
281+
// https://github.com/vitejs/vite/issues/15012
282+
if (
283+
warning.code === "SOURCEMAP_ERROR" &&
284+
warning.message.includes("resolve original location") &&
285+
warning.pos === 0
286+
) {
287+
return;
288+
}
281289
if (userConfig.build?.rollupOptions?.onwarn) {
282290
userConfig.build.rollupOptions.onwarn(warning, defaultHandler);
283291
} else {

0 commit comments

Comments
 (0)