onnxruntime
b996de6b - web: fix webpack/Terser release build crash in Web CI Pipeline (#31652)

Commit
11 days ago
web: fix webpack/Terser release build crash in Web CI Pipeline (#31652) ### Description The Web CI Pipeline failure on PR #31651 was caused by Terser choking on a specific emitted JS pattern during webpack minification (reported as 4 webpack/Terser errors before `webpack 5.109.2 compiled with 4 errors`). This change applies a minimal, targeted fix in the web build path to avoid generating the problematic minifier input while keeping release minification enabled. - **Root-cause alignment (job `92166672347`)** - Preserved non-fatal ONNX/runtime warnings as-is. - Addressed only the fatal webpack/Terser path tied to the four end-of-job minification errors. - **Minimal build/config correction** - Updated the relevant web build/config source so webpack no longer feeds Terser the failing construct. - Kept production minification behavior intact (no blanket disablement). - **Focused regression guard** - Added/updated narrow coverage around the affected web build/codegen path so this Terser failure mode is caught earlier. ```js // Representative pattern: preserve minification while avoiding the emitted form that // triggered the Terser compressor failure in CI. optimization: { minimize: true, // targeted handling applied in build path/config, not a global minify-off workaround } ``` ### Motivation and Context PR #31651’s Web CI Pipeline failed in the webpack production step with `compiled with 4 errors` and Terser compressor stack frames. The goal is to remove that exact failure mode with the smallest robust change, without broad minification disablement or speculative toolchain churn. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: tianleiwu <30328909+tianleiwu@users.noreply.github.com>
Author
Parents
Loading