Problem/Motivation

js/vendor/lite-youtube.js (vendored from @justinribeiro/lite-youtube) ends with //# sourceMappingURL=lite-youtube.js.map, but the module doesn't ship lite-youtube.js.map. The library is attached on every front-end page (ckeditor5_youtube_page_attachments()), so browsers with DevTools open request the map and log a "Failed to load source map" warning (404, or 403 on servers that deny *.map). Present in 1.0.6 and 1.0.x.

Steps to reproduce

  1. Install 1.0.6 and open any front-end page with DevTools open.
  2. The console shows the source map load error for lite-youtube.js.map.

Proposed resolution

Drop the sourceMappingURL comment when copying the vendor file (e.g. in the build/copy step), or ship the .map file. Removing the comment is the simpler option: the vendored file isn't minified.

Remaining tasks

Patch attached (one-line removal). Needs review.

Comments

trudog created an issue. See original summary.

  • g.abderrahim committed cef3661e on 1.0.x
    Issue #3630872: Remove reference to missing Lite YouTube source map
    
g.abderrahim’s picture

Thanks for the report and patch. Removed the sourceMappingURL comment referencing the unshipped lite-youtube.js.map file. Fixed in 1.0.x and included in 1.0.7: https://www.drupal.org/project/ckeditor5_youtube/releases/1.0.7

Verified that the served JavaScript no longer contains the broken reference and lazy embeds still render correctly. Rebuild caches after updating.

g.abderrahim’s picture

Assigned: Unassigned » g.abderrahim
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.