Exposed Secrets in JavaScript: Bundles and Source Maps Publish Your Keys
Anything compiled into a JavaScript bundle or carried in a source map is readable by every visitor. Here is how API keys and private keys end up there, how to tell a public identifier from a real secret, and why rotation, not deletion, closes the exposure.