Skip to content

Include Minified Version in NPM Package #48

@RehanSaeed

Description

@RehanSaeed

Here are five important reasons why shipping the minified version in the NPM package is a good thing:

  1. To support Subresource Integrity (SRI) - This is used to ensure that the copy of a file on a CDN has not been tampered with. The minified file on the CDN is compared to a local copy but for that to happen both minified copies need to be the same! If you don't provide a minified copy, then people will use their own minified file which may be different. The only way around this is to manually download the copy on the CDN instead, thus removing the need for the NPM package entirely!
  2. Using Uglify on jQuery outputs a larger script than the one they officially provide. They must use specific settings to get the smallest file possible.
  3. The minified script is the final product, not the unmodified script. All large projects provide a minified script.
  4. People don't want to have to fire up a build pipeline just to minify this file. An unminified copy should be provided just for the pure convenience of it!
  5. I just raised the same PR for jquery-validation and it was accepted.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions