Dashboards & Visualizations

Modern JS Tooling Setup for Splunk App / Sourcemaps Not Working Properly

jdawsonqmulos
Observer

I'm working on a Splunk app which uses Webpack to bundle and compile the Javascript to ES5. I'm generating sourcemaps using the "source-map" devtool option in the webpack.config.

As detailed in this post by @aprummer , Splunk injects some lines of internationalization code during runtime at the top of each page, which throws off the reference points within the sourcemaps. @aprummer solved this by regenerating the sourcemaps with a line offset. I tried this approach offsetting the sourcemaps by the 5 lines added at the beginning of each file, and while I did see some success with some breakpoints being hit closer to the entry point of the JS code, they are still not matching up and variables are not resolving properly.

Has anyone else had any success with using Webpack and modern JS tooling within Splunk, and if so, how did you get source maps setup properly?

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Bridging the Gap: Splunk Helps Students Move from Classroom to Career

The Splunk Community is a powerful network of users, educators, and organizations working together to tackle ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureThursday, March 27, 2025  |  11AM PST / 2PM EST | Register NowStep boldly ...