we are using create-react-app to develop our HTML-Dashboards. I guess my source maps are not working, because all assets a have the following code pre-pended:
// Translations for en_US
i18n_register({"catalog": {}, "plural": function(n) { return n == 1 ? 0 : 1; }});
I didn't find any way to stop splunk from injecting those lines.
I fixed my problem with injecting 6 empty lines (on my instance it where six lines, which got injected) to the generated source-map.
see https://gist.github.com/prumand/73ae1a01d22029d7969ce8a5dcaa453d
I didn't find any way to stop splunk from injecting those lines.
I fixed my problem with injecting 6 empty lines (on my instance it where six lines, which got injected) to the generated source-map.
see https://gist.github.com/prumand/73ae1a01d22029d7969ce8a5dcaa453d
I'm also interested in developing dashboards using create-react-app (for Splunk enterprise). Would you mind sharing some basic information for how you're doing this? (e.g. how do you go about importing the Splunkjs libraries and configuring them within your files, etc.). Also, if you were able to resolve your issue, would you mind posting that too? Thanks in advance.
Unfortunately I didn't find a way yet.
We have a rather interactive app, so we just used rxjs for polling and fire oneshot queries without using the sdk. I'm happy to share that with you. There are no pms here?
I see. I'm not familiar with rxjs so it probably wouldn't help much if you shared at this time. But thanks! BTW, just in case you didn't see it, here's the only other post I found that mentions the use of Splunk sdks with react: https://answers.splunk.com/answers/526322/how-to-use-reactjs-component-in-splunk-dashboard.html.
@aprummer have you checked out Splunk Developer Cloud which was announced as Splunk Next Beta last year during .Conf? It is based on react-ui : https://www.splunk.com/blog/2018/10/16/splunk-dashboards-ui-in-the-new-splunk-developer-cloud-sdc-be...
Thanks for the link, but I think that doesn't help me.
I use the bundler to create the js file, so the source maps wouldn't work anyway.