Search code examples
javascriptsentrysource-maps

How to reduce sourcemap files?


I know I can reduce my code files by compressing them. But how can I reduce the file size of my source map? When I parse my code by Sentry. I get the exception that the source map too large. I try to use 'cheap-source-map' to replace 'source-map', but the filesize has not been reduced, it actually has become larger

devtool: 'source-map',

I wonder What I did wrong, can someone please lend me a hand?


Solution

  • If you hit the size limit for source maps, it means that we tried to fetch them from your servers. If you want to use any size, then you need to upload those files directly: https://docs.sentry.io/platforms/javascript/sourcemaps/uploading/