file assigned sourcemappingurl, but already has one JS – Code Example


In this article we will show you the code to resolve the warning -file- is being assigned a //# sourceMappingURL, but already has one. This is generally raised when there is a map file but you specified it again in your javascript file.

Code Example –

You have 2 ways to define a source file in your javascript –

1. Using comment – Add the comment in JS file

//# sourceMappingURL=

2. Using header – Set this header in your JS file

X-SourceMap: /path/to/

Source: MDN