New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for cdn
field
#66
Comments
Hi @porsager, please see #63 (comment) and #63 (comment) for my thoughts on this. Basically, I haven't heard any proposal yet for a FWIW the only people who seem to be pushing for this are the jsDelivr people who introduced npm support last month. We've been doing it for over 2 years here. |
Hi @mjackson. If you remove the support for the browser field there's really no vendor agnostic way to point to a "browser distribution" in package.json, My thought when seeing the I'm not saying the unpkg field shouldn't exist, I just think it would be nice if there was a common field to support the "browser distribution" path, so package.json is kept neutral, and package maintainers won't have to add multiple cdn specific keys for the same value. By the way, I love unpkg and use it every day - so thanks are in order as well ;) |
Sorry for being so slow to respond here. While I agree with you that the current For now, people can just use the |
These popular CDNs will read the respective field from package.json when deciding which file to serve by default. Using the minified UMD bundle improves performance and removes the need to load direct dependencies. There doesn't seem to be a consensus for a "cdn" field, so we have to linger on with these vendor-specific fields. See mjackson/unpkg#66
Now that the
browser
field will most likely be deprecated I think adding support forcdn
ifunpkg
is not present would be the right thing to do.Having to ask package maintainers to add multiple fields seems very unnecessary if
cdn
can cover 99% of the cases.Maybe I'm missing something, but what are the cons of adding support for
cdn
?The text was updated successfully, but these errors were encountered: