Opened 6 years ago
Closed 6 years ago
#44560 closed defect (bug) (fixed)
Console warning because `build/.../underscore.min.js` references `sourceMapURL` that doesn't exist
Reported by: | iandunn | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.1 | Priority: | low |
Severity: | minor | Version: | 5.1 |
Component: | Build/Test Tools | Keywords: | good-first-bug has-patch needs-refresh |
Focuses: | javascript | Cc: |
Description
r43138 introduced a regression where build/wp-include/js/underscore.min.js
has an invalid sourceMapURL
value:
//# sourceMappingURL=underscore-min.map
This results in a warning in the browser console:
Source map error: request failed with status 404 Resource URL: http://wp-develop.test/wp-includes/js/underscore.min.js?ver=1.8.3
Attachments (13)
Change History (20)
#2
@
6 years ago
I was able to replicate the warning.
However, I can't find the underscore.min.js file anywhere inside the src directory, so confused as to how to proceed with the issue.
#3
@
6 years ago
- Keywords has-patch added; needs-patch removed
I was able to reproduce the console warning, and I'm attaching a patch that should fix this.
I needed to add both underscore-min.map
and underscore.js
to the section of the Gruntfile that copies over npm-package files. Adding only the map file didn't eliminate the error (because the map lists underscore.js
with the "sources"
key).
If there's a better approach or change needed, I'm happy to comply. Thx!
Related r25072, r37723