Resolves warnings in Chrome Dev Console:

"DevTools failed to parse SourceMap: .../core/vendor/..."
This commit is contained in:
Guillaume Boudreau 2018-04-29 09:29:56 -04:00
parent a546dcfcb3
commit eb97035312
No known key found for this signature in database
GPG Key ID: 4536901BF6B0FCFA
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');
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);

6
core/vendor/core.js vendored

File diff suppressed because one or more lines are too long