Tweaks

How to Hide Source Map References in WordPress

Remove sourceMappingURL and sourceURL references from your site’s frontend output with one toggle in WP Ghost. Source map references are debugging metadata embedded in minified CSS and JavaScript files. They’re invisible to visitors but fully visible in page source and browser DevTools – revealing internal file names, build structures, and project organization to anyone who looks. One toggle strips them all.

What Are Source Map References?

Source map references are lines added to the end of minified CSS and JavaScript files that point browsers to separate .map files. These map files let developers reconstruct the original, unminified source code inside browser DevTools for easier debugging.

Most WordPress themes and plugins ship minified files for performance. Many of them include source map references like these at the bottom:

In JavaScript files:

//# sourceMappingURL=app.min.js.map