@edx/frontend-build currently uses the new-relic-source-map-webpack-plugin package in its production Webpack configuration file to upload source maps to New Relic to be able to view un-minified stack traces for JS errors.
However, it was noticed that since upgrading to Webpack 5, we seem to have lost the ability for source maps to be uploaded to New Relic. This is likely due to new-relic-source-map-webpack-plugin being archived and no longer actively maintained, having not received any updates to be compatible with Webpack 5.
There is an official package from New Relic (i.e., @newrelic/publish-sourcemap) that the new-relic-source-map-webpack-plugin uses under the hood.
Possible implementation considerations:
Create our own custom Webpack plugin that uses @newrelic/publish-sourcemap behind-the-scenes.
Fork new-relic-source-map-webpack-plugin and fix whatever the Webpack 5 compatibility issue is there.
AC
Verify that source maps are correctly uploaded to New Relic to view un-minified stack traces of JS errors.
Context
@edx/frontend-build
currently uses thenew-relic-source-map-webpack-plugin
package in its production Webpack configuration file to upload source maps to New Relic to be able to view un-minified stack traces for JS errors.However, it was noticed that since upgrading to Webpack 5, we seem to have lost the ability for source maps to be uploaded to New Relic. This is likely due to
new-relic-source-map-webpack-plugin
being archived and no longer actively maintained, having not received any updates to be compatible with Webpack 5.There is an official package from New Relic (i.e.,
@newrelic/publish-sourcemap
) that thenew-relic-source-map-webpack-plugin
uses under the hood.Possible implementation considerations:
@newrelic/publish-sourcemap
behind-the-scenes.new-relic-source-map-webpack-plugin
and fix whatever the Webpack 5 compatibility issue is there.AC