import React from 'react'; import Wrapper from './Wrapper'; const styles = { homeExample: { textAlign: 'center', backgroundColor: '#eee', margin: '2em 0', padding: '5px 0' } }; export default function Home() { return (

unpkg is a fast, global{' '} content delivery network {' '} for everything on npm. Use it to quickly and easily load any file from any package using a URL like:

unpkg.com/:package@:version/:file

Examples

Using a fixed version:

You may also use a{' '} semver range or a{' '} tag instead of a fixed version number, or omit the version/tag entirely to use the{' '} latest tag.

If you omit the file path (i.e. use a “bare” URL), unpkg will serve the file specified by the unpkg field in{' '} package.json, or fall back to main.

Append a / at the end of a URL to view a listing of all the files in a package.

Query Parameters

?meta
Return metadata about any file in a package as JSON (e.g. /any/file?meta)
?module
Expands all{' '} “bare” import specifiers in JavaScript modules to unpkg URLs. This feature is{' '} very experimental

Workflow

For npm package authors, unpkg relieves the burden of publishing your code to a CDN in addition to the npm registry. All you need to do is include your UMD build in your npm package (not your repo, that's different!).

You can do this easily using the following setup:

That's it! Now when you npm publish you'll have a version available on unpkg as well.

); }