Friday, May 24, 2024
 Popular · Latest · Hot · Upcoming
26
rated 0 times [  28] [ 2]  / answers: 1 / hits: 18022  / 6 Years ago, mon, june 18, 2018, 12:00:00

I am using a couple of 3rd party minified Javascript files that have no .map file. When I am debugging in Firefox DevTools, it consistently shows these errors:



Source map error: request failed with status 404
Resource URL: https://foo.domain.com/widgets/widgets.min.js
Source Map URL: widgets.min.js.map


This is really distracting since there are a number of these files and they really pollute the console.



Is there anyway to turn these warnings off?


More From » firefox

 Answers
34

You can disable source maps globally by going into the Toolbox Options of the Developper Tools and unchecking Enable Source Maps.



You can also provide an empty source map for some specific JavaScript files. Use a local copy of the files (at least during development) and modify the source maps directive:



//# sourceMappingURL=http://example.com/path/to/your/sourcemap.map


by pointing to an empty source map file. You can also just remove the source map directive from the file.


[#54180] Wednesday, June 13, 2018, 6 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
nicole

Total Points: 648
Total Questions: 95
Total Answers: 103

Location: Turks and Caicos Islands
Member since Sun, Mar 7, 2021
3 Years ago
nicole questions
Mon, Mar 22, 21, 00:00, 3 Years ago
Thu, Jan 23, 20, 00:00, 4 Years ago
Wed, Nov 27, 19, 00:00, 5 Years ago
Fri, May 17, 19, 00:00, 5 Years ago
;