Source maps for HTML inline scripts

Hey guys,
I’ve been reading the docs in regards Sentry source map integration by separately uploading those directly to Sentry which is exactly what I need.

However, I am not quite sure on what to do in case I would like to provide source maps for HTML inline scripts since those are not really based on filenames?

How could it be referenced in this case?

Any help would be really appreciated.

Thanks in advance

We can’t support this case, and I’m not sure of any reliably way this could even work. Even fetching JavaScript source out of HTML pages is hit or miss since line number are not stable within HTML documents typically unless your site is fully static.

I’d just highly recommend using an external resource if you want to use sourcemaps.

tbh I’m not even sure if the sourcemap spec would support this anyways.

Thanks for your reply @matt
I understand your point. However, it may be a necessary evil for platforms developed using web components or frameworks such as Polymer where all code is comprised of nested stylesheets and scripts inside HTML files.

Hopefully, with browser support expanding, this will be a use case that is often found on websites going forward.

Anyway, I believe it would perhaps be interesting to investigate the viability for this.

Thanks again and have a great weekend.

All the best