Skip to content

Commit a0bbf01

Browse files
Gunn1claude
andcommitted
Improve: Add webpack plugin to suppress onnxruntime-web warnings at runtime
- Add custom webpack plugin to filter onnxruntime-web warnings from compilation - Removes warnings at runtime in dev server - Maintains all existing functionality and VAD system 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 43a35fe commit a0bbf01

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

frontend/next.config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,19 @@ const nextConfig = {
1313
},
1414
])
1515

16+
// Add rule to suppress onnxruntime-web warnings at compilation level
17+
config.plugins = (config.plugins || []).concat([
18+
{
19+
apply: (compiler) => {
20+
compiler.hooks.compilation.tap('SuppressOnnxWarnings', (compilation) => {
21+
compilation.warnings = compilation.warnings.filter(
22+
(warning) => !warning.message?.includes('onnxruntime-web')
23+
)
24+
})
25+
},
26+
},
27+
])
28+
1629
// Handle VAD worklet file
1730
config.module.rules.push({
1831
test: /vad\.worklet\.js$/,

0 commit comments

Comments
 (0)