# vite-plugin-cdn-tmp

Latest version **0.0.0** (published 2022-02-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install vite-plugin-cdn-tmp
pnpm add vite-plugin-cdn-tmp
yarn add vite-plugin-cdn-tmp
bun add vite-plugin-cdn-tmp
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.0 |
| Published | 2022-02-06 |
| First published | 2022-02-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=12.0.0 |
| Dependencies | 3 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 83336 |
| Author | Evan You |
| Maintainers | sachaw |

## Links

- npm: https://www.npmjs.com/package/vite-plugin-cdn-tmp
- Repository: https://github.com/vitejs/vite
- Homepage: https://github.com/vitejs/vite/tree/main/packages/plugin-cdn#readme
- Issues: https://github.com/vitejs/vite/issues
- npm.io page: https://npm.io/package/vite-plugin-cdn-tmp

## Dependencies (3)

- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.1
- [magic-string](https://npm.io/package/magic-string.md) ^0.25.7
- [es-module-lexer](https://npm.io/package/es-module-lexer.md) ^0.3.26

## Recent versions

- 0.0.0 (latest) — 2022-02-06

## README

# @vitejs/plugin-cdn [![npm](https://img.shields.io/npm/v/@vitejs/plugin-cdn.svg)](https://npmjs.com/package/@vitejs/plugin-cdn)

**Note: this plugin requires `vite@^2.0.0-beta.26`**.

A plugin that loads specified dependencies over Native-ESM CDNs during dev, and downloads / includes them in the production bundle during build.

## Usage

```js
// vite.config.js
import cdn from "@vitejs/plugin-cdn";

export default {
  plugins: [
    // provider can be one of: 'skypack' | 'esm.run' | 'jspm'
    cdn("skypack", {
      // list dependencies like in package.json
      // note that jspm does not support semver ranges
      vue: "^3.0.5",
    }),
  ],
};
```

## Supported Native ESM CDNs

- [skypack](https://www.skypack.dev/)
- [esm.run](https://www.jsdelivr.com/esm)
- [jspm](https://jspm.org/)\*

---

\*Note: `jspm` does not support semver ranges and can only use exact version of dist tags. It also detects the usage of `process.env` and turns Vue esm files into CJS which breaks its usage as native ESM.

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