Output stack traces for Webpack errors during build #25037
Labels
topic: webpack/babel
Webpack or babel
type: feature or enhancement
Issue that is not a bug and requests the addition of a new feature or enhancement.
Summary
During
gatsby build
, errors encountered while rendering React components are shown asWebpackError: ...
, without a useful stack trace. Would it be possible to add a stack trace through the React component tree, or at least the line number of where the error occurred?Basic example
Open the code sandbox and wait for the build to run into the error. The output will look like the following:
Motivation
This would enable tracking errors that occur in React components during SSR.
An alternative would be documentation about how to step through React components during SSR, added to https://gatsby.dev/html-builds or perhaps to https://www.gatsbyjs.org/docs/debugging-the-build-process/.
The text was updated successfully, but these errors were encountered: