Trying to better understand and control the terminal output when using wp-scripts build
. This is a simple repo with an intentional error in the code so I can adjust what is displayed.
Goal:
Attempting to use the stats-options but not getting the desired results.
wp-scripts-terminal/webpack.customizations.js
Lines 50 to 75 in 6427bae
- https://stackoverflow.com/questions/34828222/webpack-hide-stack-trace-from-babel-errors - same issue, no solution
- https://stackoverflow.com/questions/58694583/webpack-with-babel-loader-hide-babel-error-stack-trace - no solution
- https://www.npmjs.com/package/error-logger-webpack-plugin - abandoned
- https://www.npmjs.com/package/pretty-error - abandoned
- https://stackoverflow.com/questions/56023389/better-errors-in-console-after-compiling-scripts-using-webpack - source maps
- Maybe this is what is happening:
The main problem some tools (for example node-sass, maybe due bindling) put stack inside message, so because of errorDetails enabled by default you see the stack, but this stack just in error message, so I don't think we can solve it on webpack level...