Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime loading of source maps? #231

Open
michaelAtCoalesce opened this issue Apr 8, 2022 · 1 comment
Open

runtime loading of source maps? #231

michaelAtCoalesce opened this issue Apr 8, 2022 · 1 comment

Comments

@michaelAtCoalesce
Copy link

is there a way to load source maps at runtime?

i'd like to store my source maps in a specific location on my webserver, say build/sourcemaps/ - but i don't want to embed them with the sourceMappingURL comment so that customers can see it.

i'd like to, only when i need it, somehow configure the stacktrace.js to only pull the sourcemaps at the moment that i need them from this hidden location on my webserver - is this possible?

@OutdatedVersion
Copy link

In a browser environment, I think this would only defer the loading and those customers could see it in their network requests effectively making it theatre.

But, you should be able to generate your bundles with a sourceMappingURL targeting a remote source (i.e. some path on your webserver) and stacktrace.js will fetch it on demand (assuming offline is not true). Probably need some sort of auth/firewall on that endpoint since you're concerned about the maps being public. Using sourceCache would let you fetch the resources yourself as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants