Merge pull request #9340 from gboudreau/dev/chrome-devconsole-sourcemap-warnings

Resolves warnings in Chrome Dev Console
This commit is contained in:
Morris Jobke 2018-05-03 16:58:41 +02:00 committed by GitHub
commit 2d66f04aa0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View file

@ -30,7 +30,10 @@ $vendors = $data['vendor'];
$vendorjs = fopen(__DIR__.'/../core/vendor/core.js', 'w'); $vendorjs = fopen(__DIR__.'/../core/vendor/core.js', 'w');
foreach($vendors as $vendor) { 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); fwrite($vendorjs, PHP_EOL);
} }
fclose($vendorjs); fclose($vendorjs);

6
core/vendor/core.js vendored

File diff suppressed because one or more lines are too long