As far as I understand if you want to use React.js library you should comply with MIT license by adding its copyright and permission notice before the library is included to the source code (to the bundle.js for an example). However, npm React package is distributed with this comment on top of JS files:

/** @license React v16.5.2 * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */


  1. Why its enough to include only copyright without permission notice?
  2. What does "LICENSE file in the root directory of this source tree." wording means? After bundling this comment will be the part of the bundle.js file deployed to the web server. So should web server has some sort of license.md at its root? I don't think so, but this got me confused...

1 Answer 1


This is probably incompatible with the license, but not necessarily.

The MIT license has only one license requirement:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

While the comment shows the copyright notice it DOES NOT show the permission notice. At the face of it, this is a license violation.


1) React has a CLA, and Facebook is not bound by the MIT license. They can distribute and authorize others to distribute React without following the MIT license.

2) A minified file is essentially a binary. It is not reasonable to interpret the MIT license in a way that requires the license to be physically copied into the binary. It is OK to instead show the license in related documentation, such as a README or a LICENSE file. Here, the header seems to refer to a LICENSE file in the source tree, e.g. as available on Github.

If the NPM package contains documentation which includes the license, everything is fine, although the comment will still be rather confusing.

However, re-publishing this file as is might not necessarily be allowed. I'm not sure whether this is OK because you would be showing a verbatim copy, whether you would have to correct the header comment to include the full license, or whether you should display the license on the website that also publishes the copy of React.

  • My assumption is that re-publishing this file verbatim would be allowed in practice, because you can assume in good faith that the file in a format that is intended for such re-publishing is free from legal defects that would prevent you from doing so.

  • On the other hand, nothing exempts you from the license conditions. If you include React in your software, you must somehow include React's MIT license. But I have yet to see a webapp that handles front end licenses properly, e.g. by attributing third party libraries in an “About” screen.

I assume that linking to the license would be equivalent to including the license, as long as the linked page is reachable. For example, jQuery chooses to link to its MIT license via this header in its minified build:

/*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.