Preact: Add to CDNJS

Created on 25 Jun 2016  路  5Comments  路  Source: preactjs/preact

Would be great to have this as a CDN package so it's easily accessible on Codepens, etc.

help wanted question

All 5 comments

Sure! I'm not familiar with the process for this - any pointers?

Currently, I just recommend that everyone use the lovely npmcdn by @mjackson:

latest stable (4.8.0): https://npmcdn.com/preact
latest beta (5.1.0-beta.19): https://npmcdn.com/preact@beta

The nice part about this is you can pass any semver range as @version, so you can take advantage of the fact that minor version changes shouldn't break your Codepens, but still get the latest version of the library.

Also, it hosts all the npm dist files, including Preact's optimized .min build: npmcdn.com/preact@beta/dist/preact.min.js

Ah, after looking into the docs more it seems like npmcdn could work. The main benefit of cdnjs is it's discoverability on search engines.

Yes, and I think that's also what Codepen uses for their built-in JS library search. I can look into getting Preact added there.

PR to cdnjs is here: cdnjs/cdnjs#8391

Yay, we're on CDNJS!

Was this page helpful?
0 / 5 - 0 ratings