Modern front end tooling makes this easy to get wrong, because the default behaviour is tuned for debugging rather than for shipping. Two separate problems usually arrive together.
The first is source maps. A .js.map file next to your bundle lets anyone reconstruct your original, unminified source, with comments, file names and directory structure intact. That is a disclosure problem rather than a direct break, but it removes the effort from finding everything else.
The second is the serious one. Any value compiled into a client bundle is public, permanently, no matter how it is named. A build time variable prefixed for client exposure, an API key passed to a browser SDK, a token inlined for convenience: all of it ships to every visitor. Minification is not protection, and neither is removing the source map. If a secret reached the browser, it has already been disclosed.
