Customer Self-Service Portal
            Knowledge Base Site24x7 Knowledge Base APM Insight Real User Monitoring

            Decode JavaScript files using source maps

            In general, when your source code has gone through multiple transformations, it is difficult to debug. In such cases, you can generate a source map - a source map maps the transformed source with the original.  This enables you to reconstruct the original source, making it easier to debug. Learn more about source maps here.

            You can generate source maps using uglifyjs or webpack

            Generate source maps using uglifyjs:

            uglifyjs [source files] \ 
            -o yourjsfile.min.js \ 
            --source-map \ 
            --source-map-include-sources \ 
            -c -m

            Generate source maps using webpack:

            devtool: 'source-map', 
            output: { 
            path: path.join(__dirname, 'dist'), 
            filename: '[name].js', 
            sourceMapFilename: '[name]', 

            You can import the generated source maps in Site24x7 RUM to analyze the corresponding stack trace. Learn more
            Updated: 05 Sep 2019 07:32 PM
            Help us to make this article better
            0 0