The JavaScript warning "-file- is being assigned a //# sourceMappingURL, but already has one." occurs when a source map has been specified more than once for a given JavaScript source.
The JavaScript warning "-file- is being assigned a //# sourceMappingURL, but already has one." occurs when a source map has been specified more than once for a given JavaScript source.
Warning: -file- is being assigned a //# sourceMappingURL, but already has one.
A warning. JavaScript execution won't be halted.
A source map has been specified more than once for a given JavaScript source.
JavaScript sources are often combined and minified to make delivering them from the server more efficient. With source maps, the debugger can map the code being executed to the original source files. There are two ways to assign a source map, either by using a comment or by setting a header to the JavaScript file.
Setting a source map by using a comment in the file:
//# sourceMappingURL=http://example.com/path/to/your/sourcemap.map
Or, alternatively, you can set a header to your JavaScript file:
X-SourceMap: /path/to/file.js.map
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Already_has_pragma