Most modern minification tools support the generation of source maps, so it is easy to add this to your build process:
When generating source maps you normally have the option to include the source content within the source map or leave it in the external source files. If you leave it external Bugsnag will need access to those source files to display the context of the error (without it we will just display the source file and line number in the stacktrace).
If you host the source map Bugsnag can fetch it when an error is
received. To achieve this you can include the special
property in the header.
Most minification tools, including UglifyJS 2, will automatically add the
When generating source maps you’ll usually have the option to include the source content within the source map or leave it in the external source files. If you have not included the source content in the source map we will also attempt to fetch the source files based on the path specified in the source map.
If your server policy denies access to external IP addresses and websites, you will need to whitelist the IP addresses below. A whitelist provides access to designated IP addresses and sites that would otherwise be prevented by your security policy.
If you don’t want to host your source maps, you can upload them to Bugsnag via our upload API.
See source map upload API for details.