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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...