#46218 closed defect (bug) (fixed)
404 error in source mapping in jquery.form.min.js
Reported by: | valicesupport | Owned by: | peterwilsoncc |
---|---|---|---|
Milestone: | 5.1 | Priority: | normal |
Severity: | normal | Version: | 5.1 |
Component: | Build/Test Tools | Keywords: | has-patch has-unit-tests commit dev-feedback |
Focuses: | Cc: |
Description
Source map error: request failed with status 404
In the latest version of WordPress, the jquery.form.min.js file is referencing a sourceMappingURL at the bottom of the file.
Attachments (2)
Change History (8)
#1
@
6 years ago
- Component changed from General to Build/Test Tools
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 5.1
- Version changed from 5.0.3 to trunk
#2
@
6 years ago
- Keywords has-patch has-unit-tests commit dev-feedback added; needs-patch removed
In 46218.diff:
- Don't copy
jquery.form.min.js
fromnode_modules
, uglify it fromjquery.form.js
. - Add a unit test to ensure all JS files in the
build
directory don't contain asourceMappingURL
directive. - Remove the ad-hoc unit tests that check
backbone.min.js
andjquery.js
for asourceMappingURL
.
The unit test allows sourceMappingURL=data:...
URIs, as these won't cause an extra HTTP request.
#3
@
6 years ago
In 46218.2.diff:
- adds
uglify:jqueryform
touglify:all
andprecommit:js
tasks - otherwise identical to original patch
I've tested both the grunt watch
and grunt build
commands to ensure the file is included. It is.
Note: See
TracTickets for help on using
tickets.
Thank you for the bug report, @valicesupport!
This is caused by the build process (
grunt copy:npm-packages
) copying the minified files from the packages that it's importing, rather than using theuglify
part of the build process.