Sentry configuration sourceMap failed to use @ sentry/webpack-plugin plug-in

question:
using @ sentry/webpack-plugin plug-in to upload sourceMap, the source file is uploaded successfully, but the exception result still cannot be mapped to the source file
configuration code:

//webpack.prod.conf.js
const SentryPlugin = require("@sentry/webpack-plugin");
new SentryPlugin({
      release: process.env.RELEASE_VERSION,                   
      include: path.join(__dirname,"../dist/static/js/"), 
      ignore: ["node_modules", "webpack.config.js"],  
      urlPrefix : "~/static/js""        
    }),

sentry is a self-built server
after executing the following code, the effect is as follows

node build/build.js

clipboard.png

clipboard.png

Apr.09,2022

with the same upload configuration, the official service provided by sentry is OK, but the privatized service is not. The sentry map file deployed by yourself can be uploaded successfully, but it just doesn't match. Does your deployed sentry need other configurations to support matching map files?


reason:

  1. the sentry server is deployed on the intranet
  2. url-prefix:127.0.0.1:8800/static/js built with Nginx on the project page
  3. the network of this machine has been blocked by the firewall, causing other private networks to lose access to ping at all. Now the solution is perfect
  4. if you deploy the project online, url-prefix: "~ / static/js", it will be fine
Menu