diff --git a/tools/gutenberg/copy-gutenberg-build.js b/tools/gutenberg/copy-gutenberg-build.js index d707a2812e528..36b55bcae5d64 100644 --- a/tools/gutenberg/copy-gutenberg-build.js +++ b/tools/gutenberg/copy-gutenberg-build.js @@ -922,7 +922,7 @@ async function main() { // Transform function to remove source map comments from all JS files const removeSourceMaps = ( content ) => { - return content.replace( /\/\/# sourceMappingURL=.*$/m, '' ).trimEnd(); + return content.replace( /\/\/# sourceMappingURL=.*$/gm, '' ).trimEnd(); }; if ( fs.existsSync( scriptsSrc ) ) {