Silence directive warnings

This commit is contained in:
Nate Kelley 2025-09-02 13:53:32 -06:00
parent 05a402e5bc
commit d752e2f922
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
1 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,30 @@
export default {
rollupConfig: {
onwarn(warning, defaultHandler) {
// Suppress "use client" directive warnings
if (warning.code === "MODULE_LEVEL_DIRECTIVE") {
return;
}
// Suppress legitimate third-party circular dependency warnings
if (warning.code === "CIRCULAR_DEPENDENCY") {
const message = warning.message || "";
// Suppress nitropack internal circular dependencies (framework issue)
if (message.includes("nitropack/dist/runtime/internal/")) {
return;
}
// Suppress TanStack store internal circular dependencies (library issue)
if (message.includes("@tanstack/store/dist")) {
return;
}
// Suppress juice library circular dependencies (library issue)
if (message.includes("juice/lib/")) {
return;
}
}
// Handle all other warnings normally
defaultHandler(warning);
},
},
};