Let's take React framework for example.

During the minification process, all the code is modified and put in a single minified file also stripped of licenses. As far as I understand, as required by MIT license, users should also receive original code and original license of the React framework.

How is that dealt with from the legal perspective?

Same goes for all other Javascript frameworks, it's common practice for performance reasons, to minify the code which is served on a production site.


1 Answer 1


As Brandin points out, this material is pretty much completely covered in Can I minify Javascript that requires a copyright notice?, over on SoftwareEngineering.SE. However, questions can't be closed as duplicates of those on other sites; although I could kick this question over to SE.SE so it could be closed as a duplicate there, I think it's good to have this question appear here also. So I summarise the problem here, then briefly reproduce the argument from the linked SE.SE question, with which I agree.

Most non-copyleft free licences have requirements similar to these from the 3-clause BSD licence:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Most JS used on the internet is minified before publication, and this process normally removes all comments, including copyright notices, along with other "extraneous" material. Minified JS isn't exactly binary code, but it's not exactly source code within the traditional meanings of free software, either; GPLv3 defines source code as "the preferred form of the work for making modifications to it", and minified JS is hardly that. In any case, whichever form you feel it is, the copyright notice and a short text passage must go along with it.

As the leading answer on SE.SE points out, most minifying software has an option to leave certain extraneous text in the input untouched. You should find out how you instruct your minifier of choice to do this, and ensure that whatever you are required to pass on untouched by the licence is left untouched.

If you unwilling or unable do that, you should be aware that you are violating copyright. It is highly unlikely there will be any comeback for that, but if there should be, neither "I like my minifier and I couldn't work out how to make it preserve the copyright notices" nor "My boss told me to cut out the extra 1500 bytes" will be an acceptable excuse.

  • thanks for explaining all this in detail. I agree with your explanation, however sometimes it's not practical. This is because minifiers can't always understand that the text is actually a licence and leave it intact. There is also this part with the delivery of the original source code, which is not contained in the minified file.
    – Sava
    Commented Apr 15, 2020 at 12:15
  • 1
    @Sava there is no source code delivery obligation in this case, so that seems irrelevant. And the point of the linked answer is that not that you can leave your minifier to work out which licence text must be preserved, but that you are obligated to choose a minifier that you can instruct as to what must be preserved, and moreover that you must do so.
    – MadHatter
    Commented Apr 15, 2020 at 13:02
  • yes, I just had a loot at the MIT license again and it seems to me that you just need to provide the license, not the complete original(non minified) code. For the minifier part, I'm not aware of any that can work out all the licences and texts out of the box.
    – Sava
    Commented Apr 15, 2020 at 13:08
  • Actually, it says "in the documentation and/or other materials provided with the distribution", so with this in mind it would probably be enough to distribute the license in a different file.
    – Max Xiong
    Commented Sep 18, 2020 at 2:14
  • (This being said, the main question here is whether or not the .js file is considered to be distributed individually, or with the entire website).
    – Max Xiong
    Commented Sep 18, 2020 at 2:22

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.