Remove all occurences of sourceMappingURL and sourceURL when JS files are aggregated

Created on 31 December 2014, about 10 years ago
Updated 2 June 2023, over 1 year ago

Problem/Motivation

We need to remove all occurrences of sourceMappingURL and sourceURL including the old //@ and new //# syntax. Otherwise these source map comments are causing 404 errors after the JS files are aggregated. After JS aggregation the source maps can no longer used.

This can be done with a regex in:

  • D7: drupal_build_js_cache().
  • D8: JsCollectionOptimizer::optimize()

Proposed resolution

Remove sourceMappingURL and sourceURL from JS files.

Remaining tasks

Review and commit.

User interface changes

None.

API changes

None.

🐛 Bug report
Status

Fixed

Version

7.0 ⚰️

Component
Asset library 

Last updated about 4 hours ago

No maintainer
Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024