Build: Re-incorporate Webpack devtool into development build #5931
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related: #5267
This pull request seeks to reincorporate the Webpack
devtoolconfiguration option into the development build, enabling improved debugging through the browser developer tools. Without this option, the quality of the code will appear as transformed, making it difficult to trace through code in the source tab.See: https://webpack.js.org/configuration/devtool/#devtool
These changes merely restore the value that existed prior to Webpack 4 upgrade.
If performance is a concern, we may consider another option, though ideally it is one of equivalent quality, particularly on the more challenging points of source maps: breakpoints set where intended, including in-line statements, and step-through and step-into with expected behavior.
We may also consider easier overrides, such as an environment variable. Though in this case, I might suggest it as a case for encouraging source debugging.
Testing instructions:
Verify source maps present if and only if development build
npm run dev(.mapfiles, visible in sources tab of decent browser).