Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291399

Missing .map files causing 404 file not found errors

$
0
0

Problem/Motivation

Core has added minified JS libaries. These files reference sourceMappingURL for modern browsers. Chrome will cause a lot of 404 file not found errors in server logs for this reason. I have already developed a solution for D7 and D8 to solve these issue in aggregated JS files. See #2400287: Remove all occurences of sourceMappingURL and sourceURL when JS files are aggregated. However we should add the missing .MAP files to allow easier debugging and remove these many 404 errors.

Proposed resolution

We have some options:

  1. Leave it as is with tons of 404 errors and safe 180kb .map files on page load. Very bad idea.
  2. Add the missing .map files to the asset folders. This will add around 180kb of size to the web pages. But in aggregated JS files we save these as we commit #2400287: Remove all occurences of sourceMappingURL and sourceURL when JS files are aggregated. May not really the best solution.
  3. Remove the //# sourceMappingURL= lines from all minified JS files. That means we are not shipping with original file versions. It's a reasonable good compromise I think.

Remaining tasks

May write documentation that MAP files should always exists or //# sourceMappingURL= removed from minified files to solve the 404 errors if these MAP files do not exists. For aggregated files we need to commit #2400287: Remove all occurences of sourceMappingURL and sourceURL when JS files are aggregated to remove //# sourceMappingURL= automatically.

User interface changes

None

API changes

None


Viewing all articles
Browse latest Browse all 291399

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>