summaryrefslogtreecommitdiffstats
path: root/build/mergejs.php
diff options
context:
space:
mode:
authorGuillaume Boudreau <guillaume@pommepause.com>2018-04-29 09:29:56 -0400
committerGuillaume Boudreau <guillaume@pommepause.com>2018-04-29 09:29:56 -0400
commiteb97035312780430186e44cb49c6d90f12df4a58 (patch)
treed8bc5420be37d7b55db61163e37f7221130ba001 /build/mergejs.php
parenta546dcfcb3c73b678910400f4c50175b541f76e3 (diff)
downloadnextcloud-server-eb97035312780430186e44cb49c6d90f12df4a58.tar.gz
nextcloud-server-eb97035312780430186e44cb49c6d90f12df4a58.zip
Resolves warnings in Chrome Dev Console:
"DevTools failed to parse SourceMap: .../core/vendor/..."
Diffstat (limited to 'build/mergejs.php')
-rw-r--r--build/mergejs.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/build/mergejs.php b/build/mergejs.php
index 85820c19795..e747337ef6a 100644
--- a/build/mergejs.php
+++ b/build/mergejs.php
@@ -30,7 +30,10 @@ $vendors = $data['vendor'];
$vendorjs = fopen(__DIR__.'/../core/vendor/core.js', 'w');
foreach($vendors as $vendor) {
- fwrite($vendorjs, file_get_contents(__DIR__.'/../core/vendor/'.$vendor));
+ $content = file_get_contents(__DIR__.'/../core/vendor/'.$vendor);
+ // Remove the sourceMappingURL references from the merged file
+ $content = preg_replace('@//# sourceMappingURL=.*$@', '', $content);
+ fwrite($vendorjs, $content);
fwrite($vendorjs, PHP_EOL);
}
fclose($vendorjs);