I am working on a project that uses Modernizr, which uses the MIT license. I have a modernizr-custom.js file containing code downloaded from their website and this at the top:

/*! modernizr 3.6.0 (Custom Build) | MIT *
 * https://modernizr.com/download/?-webp-setclasses !*/

I have a bundle.js file with all my JavaScript files combined into one and minified, but my minifier also removes comments if I don't remove the --compress option.

So, is it legal to just remove the credit? If not, I can just remove that option but I was wondering if it could be removed or shortened.


1 Answer 1


Yes, you can change the files in any way you wish. There is only one condition for redistributing code licensed under the MIT license:

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

In particular, there is no requirement that you include the notices in a particular file or at some particular location in a file.

Some example places to include the required notices are:

  • For a source code distribution, in a file called LICENSE, LICENSE.MIT, etc.

  • For an interactive program, in a documentation screen such as "About this application."

  • For a device, in printed material accompanying the product.

For the particular text you have indicated, this is not a copyright notice in my opinion so it does not need to be preserved:

/*! modernizr 3.6.0 (Custom Build) | MIT *

This string is informational only. It does not contain Copyright YYYY Author, and does not count as a copyright notice. Therefore it is not subject to any requirement of the MIT license. However, even if it were a copyright notice, I would argue that you could still remove it, provided that you comply with the MIT license by including the required notices somewhere else in your distribution, for example in a file such as LICENSE.MIT, or included in an a documentation screen such as "About this application", or included in a printed notice notice accompanying a product you are distributing, or in some other way that is compliant with the license requirements.

EDIT: For use in web applications specifically, please refer to this QA: Where to put license for MIT licensed code on website

  • 1
    This is a useful discussion, but not one to have in comments. I've moved it to chat.
    – ArtOfCode
    Aug 30, 2019 at 10:30

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.