I think it's more about the bundle size than a security. When you leave source maps for production the user has to download not only the minified bundle, but also the source map file which contains the source code and the mapping between them. I'd say it's better to ship unminified code than a code with source maps because it eats less traffic.
Source maps are a development tool. It shouldn't be used in production.
I think it's more about the bundle size than a security. When you leave source maps for production the user has to download not only the minified bundle, but also the source map file which contains the source code and the mapping between them. I'd say it's better to ship unminified code than a code with source maps because it eats less traffic.
Source maps are a development tool. It shouldn't be used in production.
Agree with that. Thanks.
Source maps are downloaded only if your browser has Developer tools opened.
Therefore shipping source maps to production will not affect your end-users and will help your team with the debugging.
I just tested this with google.com with dev tools opened. I don't see any source maps.
Then Google probably does not ship them at all.