Skip to content

Commit

Permalink
fix: ignore directive sourcemap error (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red authored Sep 25, 2024
1 parent 3029ffb commit 9ae7fe6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,14 @@ const silenceUseClientWarning = (userConfig: UserConfig): BuildOptions => ({
) {
return;
}
// https://github.com/vitejs/vite/issues/15012
if (
warning.code === "SOURCEMAP_ERROR" &&
warning.message.includes("resolve original location") &&
warning.pos === 0
) {
return;
}
if (userConfig.build?.rollupOptions?.onwarn) {
userConfig.build.rollupOptions.onwarn(warning, defaultHandler);
} else {
Expand Down

0 comments on commit 9ae7fe6

Please sign in to comment.