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
- Install 1.0.6 and open any front-end page with DevTools open.
- 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.
| Comment | File | Size | Author |
|---|---|---|---|
| ckeditor5_youtube-remove-lite-youtube-sourcemappingurl.patch | 247 bytes | trudog |
Comments
Comment #3
g.abderrahim commentedThanks 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.
Comment #4
g.abderrahim commented