# rollup-plugin-cdn

> Resolves CDN with Rollup

Latest version **0.1.2** (published 2017-12-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install rollup-plugin-cdn
pnpm add rollup-plugin-cdn
yarn add rollup-plugin-cdn
bun add rollup-plugin-cdn
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2017-12-15 |
| First published | 2017-11-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Andrea Giammarchi |
| Maintainers | webreflection |
| Keywords | rollup, rollup-plugin, resolve, cdn |

## Links

- npm: https://www.npmjs.com/package/rollup-plugin-cdn
- Repository: https://github.com/WebReflection/rollup-plugin-cdn
- Homepage: https://github.com/WebReflection/rollup-plugin-aliar#readme
- Issues: https://github.com/WebReflection/rollup-plugin-cdn/issues
- npm.io page: https://npm.io/package/rollup-plugin-cdn

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 0.1.2 (latest) — 2017-12-15
- 0.1.1 — 2017-11-27
- 0.1.0 — 2017-11-23

## README

# rollup-plugin-cdn

[![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000&style=flat)](https://github.com/WebReflection/donate)
[![Coverage Status](https://coveralls.io/repos/github/WebReflection/rollup-plugin-cdn/badge.svg?branch=master)](https://coveralls.io/github/WebReflection/rollup-plugin-cdn?branch=master)
[![Build Status](https://travis-ci.org/WebReflection/rollup-plugin-cdn.svg?branch=master)](https://travis-ci.org/WebReflection/rollup-plugin-cdn)
[![License: ISC](https://img.shields.io/badge/License-ISC-yellow.svg)](https://opensource.org/licenses/ISC)

Resolve locally all dependencies loaded through fully qualified CDN urls.


### Supported CDNs

Following the list of supported CDNs (so far).

  * [unpkg.com](https://unpkg.com/#/)
  * [rawgit.com](https://rawgit.com) (both dev and prod links)


### Example

If your module has [hyperHTML](https://github.com/WebReflection/hyperHTML) as dependency,
and you have installed it locally,
you can import it as fully qualified ESM module.

The remote url will be resolved through the locally installed dependency.

```js
import hyper from 'https://unpkg.com/hyperhtml@latest/esm/index.js';

hyper(document.body)`
  <h1>Hello ESM</h1>`;
```

This enables your modules to be natively testable/usable as ESM in browsers, but also easily bundled for production.


### Installation
```
$ npm install rollup-plugin-cdn
```


### Usage
```javascript
// rollup.config.js
import cdn from 'rollup-plugin-cdn';

export default {
  input: './esm/index.js',
  plugins: [cdn()],
};
```


### License
ISC, see `LICENSE` for more information.

---
_Source: https://npm.io/package/rollup-plugin-cdn · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
