Skip to content

Commit d88c581

Browse files
authored
fix: ignore directive sourcemap error (#369)
1 parent 0f7684a commit d88c581

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/plugin-react/src/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,14 @@ const silenceUseClientWarning = (userConfig: UserConfig): BuildOptions => ({
326326
) {
327327
return
328328
}
329+
// https://github.com/vitejs/vite/issues/15012
330+
if (
331+
warning.code === 'SOURCEMAP_ERROR' &&
332+
warning.message.includes('resolve original location') &&
333+
warning.pos === 0
334+
) {
335+
return
336+
}
329337
if (userConfig.build?.rollupOptions?.onwarn) {
330338
userConfig.build.rollupOptions.onwarn(warning, defaultHandler)
331339
} else {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy